TeeTree VCL for Borland Delphi and C++ Builder.
-
bertrod
- Advanced
- Posts: 151
- Joined: Wed Sep 07, 2005 4:00 am
Post
by bertrod » Mon Oct 30, 2006 4:25 pm
Hello,
Have a look on my 3 connectors : I want the 3 "derivative" nodes to be at the same position (see the red line). But you see the images of their parents are not the same size (1 is tiChecked, and 2 are larger custom images), and this leads to a small shift of the connectors (see the 3 red circles).
Is it possible to change the connectors' starting position to have them all look the same way ?
I hope you see what i mean. Here is the illustration :

-
tom
- Advanced
- Posts: 211
- Joined: Mon Dec 01, 2003 5:00 am
-
Contact:
Post
by tom » Mon Oct 30, 2006 7:10 pm
Hi bertrod,
There are several ways to solve this issue:
1. You can set the Left property of the shape
2. Better: You create your own TChildManager which takes this issue into account. The easiest way would be to descend from TTreeExplorerAlignChild (you propably only have to override the XPosition function)
3. Easiest: You create another custom image, with the same width as the other custom images, which contains the checkbox and space.
Regards,
tom
-
bertrod
- Advanced
- Posts: 151
- Joined: Wed Sep 07, 2005 4:00 am
Post
by bertrod » Tue Oct 31, 2006 12:30 pm
Hello,
I followed the 2nd solution. But I didn't create a new TChildManager; I directly changed the source code of teeTree.pas because there was just one line to change.
I changed the TTreeExplorerAlignChild.CalcXYCross function :
Old version :
Code: Select all
result.X:=AdjustedRectangle.Left+Tree.ChartBounds.Left+((X0-AdjustedRectangle.Left-TeePictureHorizMargin) div 2)
New version :
Code: Select all
result.X := AdjustedRectangle.Left + Tree.ChartBounds.Left + 6
6 represents half the size of the checkbox's image
Thanks for your help Tom.