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 :
Connector problem
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
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
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 :
New version :
6 represents half the size of the checkbox's image
Thanks for your help Tom.
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)
Code: Select all
result.X := AdjustedRectangle.Left + Tree.ChartBounds.Left + 6
Thanks for your help Tom.