Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Data property of TTreeNode

Status
Not open for further replies.

snk10

Programmer
Jun 5, 2001
2
US
I'm trying to create a TreeView that is actually a collapsable list of check boxes. I'm wondering if I can use the Data property of TTreeNode to incorporate the checkboxes or if this is even a feasable route. I realize the Data property can be any object, but can it alter the TTreeNode item?
 
what do you mean alter tree node? John Fill
1c.bmp


ivfmd@mail.md
 
I realize that the Data property of the TTreeNode is a void * and can therefore be any object, but can it change the attributes of the Item property? I want the second level nodes of the tree to essentially be check boxes, so I was wondering if the Data can be a TCheckBox and have any effect on the appearance of the TTreeNode.
 
What did I do in VisualC++:
1. handle the ntification message from tree with parameter NM_CLICK.
2. Get the coordinates of the click.
3. If you know coordinates transofrm them to client coordinates of the tree.
4. Send a hittest to the tree with coordinates what you've gotten in 3. and get the treeitem.
5. Get the lparam associated with the treeitem.
6. Go on
I think in borland is some thing as I described but borland specific. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top