View Issue Details

IDProjectCategoryView StatusLast Update
0004662JEDI VCL00 JVCL Componentspublic2009-10-03 17:31
ReporterTegiAssigned ToAHUser 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version3.34 
Target VersionFixed in Version3.39 
Summary0004662: TJvHTLabel is drawn wrong when cursor is placed over the label before it is drawn the first time
DescriptionWhen placing a quite large TJvHTLabel on a form I noticed that it is drawn two times if the cursor is placed on the label when the label shows up.

I tracked this down a bit and found out that the MouseMove event is fired before the label is drawn for the first time. In MouseMove ItemHTHeight is used, with leads to a call to HTMLDrawText.
At this stage the canvas seems to be not properly set up as this is done in TJvHTCustomLabel.Paint.

Another issue I noticed is that the label flickers when one moves the cursor out of a TJvHTLabel. This is caused by TJvHTCustomLabel.MouseLeave. By calling Invalidate there the label is repainted as desired, but the background will be also be erased. This is totally unnecessary as Paint handles this too.
As far as I can see, calling Paint there instead of Invalidate does not cause any harm.

I attached a patched version of JvHTControls.pas with my changes marked.

Greetings,
Timo
TagsNo tags attached.

Activities

2009-01-17 05:40

 

JvHtControls.pas (27,759 bytes)

obones

2009-04-29 11:44

administrator   ~0015448

Please try again with the latest SVN sources, some changes have been done in this area and I'm not seeing any flickering.
If this is still here, please provide the zipped sources of a sample application showing this.

obones

2009-07-09 17:12

administrator   ~0015825

Any news?

winny

2009-07-18 09:18

reporter   ~0015864

I'm not sure, but I think it's bad idea to paint anything wherever else than Paint method. Cursor position should be shipped (for example by private fields FX, FY) to Paint method and all painting should be done there. Whenever we need to refresh label, it should be done by Invalidate method. This is important to avoid flickering, especially with enabled DoubleBuffered.

obones

2009-08-05 12:10

administrator   ~0015929

I would really like to have the sources of sample application showing this to gain better understanding of the issue

AHUser

2009-10-03 17:31

developer   ~0016233

Fixed in SVN.

Issue History

Date Modified Username Field Change
2009-01-17 05:40 Tegi New Issue
2009-01-17 05:40 Tegi File Added: JvHtControls.pas
2009-02-02 01:22 obones Status new => acknowledged
2009-04-29 11:44 obones Note Added: 0015448
2009-04-29 11:44 obones Status acknowledged => feedback
2009-07-09 17:12 obones Note Added: 0015825
2009-07-18 09:18 winny Note Added: 0015864
2009-08-05 12:10 obones Note Added: 0015929
2009-10-03 17:31 AHUser Note Added: 0016233
2009-10-03 17:31 AHUser Status feedback => resolved
2009-10-03 17:31 AHUser Fixed in Version => Daily / SVN
2009-10-03 17:31 AHUser Resolution open => fixed
2009-10-03 17:31 AHUser Assigned To => AHUser