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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

TreeView help please

Status
Not open for further replies.

Bri123456

Programmer
Jan 3, 2002
30
CA
Hi, I have a tree view and I want to find the label of the parent that I select. For instance, I want to select a child Item in tv_tree and once this is selected I need to find out what The parent of this item is. The children are created dynamically, so it is not hard coded. Any help will be appreciated thanks
 
Try this, for instance, on treeview clicked or doubleclicked event:

Long ll_item, ll_curitem
string ls_label
tv_1.getitem(handle,ltvi_item)
ll_curitem = tv_1.finditem(CurrentTreeItem!,0)
ll_item = tv_1.finditem(ParentTreeItem!,ll_curitem)
tv_1.getitem(ll_item, atvi_item)
ls_label = ltvi_item.label

Hope that works for that you want.
J. Cura
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top