Page 1 of 1

How do you access data?

Posted: Tue Nov 25, 2008 9:48 am
by 10046016
I have replaced a Delphi TreeView with a TeeTree DBTree. On the dblclick event I used to determine if the user clicked on a parent not by the fllowing:
**
SelNode := TheTree.Selected;
If SelNode <> Nil then ParentNode := SelNode.Parent
else Parentnode := Nil;
**
With DBTree:-

1.How do I determine what level was chosen?
2.How do I access the Text string that was clicked on?

The downloaded tutorial doesn't work (on windows vista).

Thanks
Bruce

Posted: Tue Nov 25, 2008 11:18 pm
by Tom
Hi Bruce,

You can use the DblClickShape event for this purpose. The Sender argument contains a reference to the clicked shape.

The level property of a TTreeNodeShape provides information where the node is positioned in the tree (0 equals root level).

References of parent(s) are provided through the parent and parents property.

The text shown in the tree can be accessed through the Text or SimpleText property

Best regards,
tom

Posted: Tue Nov 25, 2008 11:33 pm
by 10046016
Thank you Tom - that's provided all the answers I need.

Best regards
Bruce