View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0004246||JEDI VCL||00 JVCL Components||public||2007-09-28 03:03||2008-02-21 07:26|
|Target Version||Fixed in Version||3.34|
|Summary||0004246: TJvLinkLabel has problems with painting dynamic tags|
|Description||I experience strange look of TJvLinkLabel when using dynamic tags.|
The dynamic tag is not drawn in the proper place, sometimes only the top of the text is visible sometimes not visible at all.
The problem comes from TTextHandler.EmptyBuffer where
TextOut( FPosX + Element.Node.Root.StartingPoint.X,
FPosY + Element.Node.Root.StartingPoint.Y,
prints to a random location because Element.Node.Root.StartingPoint contains trash.
The cause of the problem is in JvLinkLabelParser.pas with procedure TDefaultParser.AddSourceTreeToDynamicNode. Actually Tree.Root is bad for Addchild parameter because Tree is just a temporary variable here and it is freed. It is not the correct root for LinkLabel.
I changed it to Node.Root but this requires that to be initialized before calling AddSourceTreeToDynamicNode. The problem is solved painting is stable.
Tree := nil;
Parser := TDefaultParser.Create;
Tree := Parser.Parse(Source);
Tree.Root.OwnsChildren := False;
for I := 0 to Tree.Root.Children.Count - 1 do
|Additional Information||I attached my changed JvLinkLabelParser with 3 small changes solving this problem.|
It took several hours to find the source of the problem.
|Tags||No tags attached.|
JvLinkLabelParser.pas (13,832 bytes)
||Can you provide us with the zipped sources of a sample application showing this so that I can validate the fix? Thanks in advance.|
I attached a sample application and a word document with pictures.
It is easier to produce the problem with 2 linklabel on the form but it also happens with 1 label as you can see on some pictures.
There are also some pictures showing the wrong values causing the bad painting.
You can also see that starting up the application does not call the dynamic tag init. It is only called when changing the caption at runtime.
Unfortunatelly I am unable to attach the zip file. First I get "The page cannot be displayed" after clicking upload. When I push enter again in the address field I get this message (I tried multiple times):
APPLICATION ERROR 0000200
A required parameter to this page (bug_id) was not found.
Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
TestLinkLabel.zip (3,216 bytes)
||That's because the file was too big. I removed the exe and doc file from your zip and it uploaded just fine after that.|
Just a small note to the upload problem.
This is written in the upload section: (Max size: 5,000k).
||This is now in SVN|
|2007-09-28 03:03||fegyvej||New Issue|
|2007-09-28 03:03||fegyvej||File Added: JvLinkLabelParser.pas|
|2007-10-12 09:01||obones||Note Added: 0013943|
|2007-10-12 09:01||obones||Status||new => feedback|
|2007-10-13 11:11||fegyvej||Note Added: 0013956|
|2007-10-13 11:16||fegyvej||Note Edited: 0013956|
|2007-10-15 04:08||obones||File Added: TestLinkLabel.zip|
|2007-10-15 04:08||obones||Note Added: 0013965|
|2007-10-15 10:04||fegyvej||Note Added: 0013970|
|2008-02-21 07:06||obones||Relationship added||related to 0004247|
|2008-02-21 07:25||obones||Status||feedback => resolved|
|2008-02-21 07:25||obones||Fixed in Version||=> Daily / SVN|
|2008-02-21 07:25||obones||Resolution||open => fixed|
|2008-02-21 07:25||obones||Assigned To||=> obones|
|2008-02-21 07:25||obones||Note Added: 0014258|