Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Treeview - Invalid Key
Message
From
08/10/2004 14:17:44
 
 
To
08/10/2004 13:41:23
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00949695
Message ID:
00949989
Views:
47
The line of code below is in my NodeClicked method and in the debugger it displays the key correctly. But where do I get the "5" (or whatever node number) from? I thought it was INDEX, but that does not return anything.

The TreeView control has a single SelectedItem property that contains an object reference to the currently selected Node. It is the Nodes collection and the individual Node objects that have the properties required to navigate the tree. You can access an individual Node in the collection using either its Key or its Index like this:

Thisform.oTree.Nodes( Key ) or Thisform.oTree.Nodes( Index )

However, the value of its Index is entirely dependent on the order in which the Node is added to the TreeView so it is only useful in those instances where you need to iterate through all the children in the Nodes collection of a specific Node.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform