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

Tree View Nodes

Status
Not open for further replies.

campbere

Technical User
Oct 10, 2000
146
0
0
US
Can someone help explain the following code? I know that the Mid is evaluating Node.key starting at position 1 and ending at 1 but what is Node.key? I know that nodes make up a tree view but I dont know where the key falls into place.

If Mid(Node.key, 1, 1) = "#" And Has_data = True Then
num = Int(Mid(Node.key, 2))

Thanks,


campbere
 
A treeview's contents is a collection of Node objects. They can be accessed via the Treeview1.Nodes colelction. Each node can be given a unique key (String) with helps identify which node the user clicks. The code extract you poste does just that by checking o see if the first character of the current node's key has a hash mark in in. Maybe the original programmer used a Hash mark to denote the level that this node resides in the tree....


Fizz
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top