Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

VB .NET - Learn Visual Basic .NET

Systems Analysis - System analysis and Design tutorial for Software Engineering


You are here: Visual Basic > Advanced VB6 tutorial > Chapter 4

Node Object and Nodes Collection of TreeView Control in Visual Basic 6

A TreeView 's information is contained in a Nodes Collection of Node objects. Just as image information is stored in the ListImages Collection for the ImageList control, node information is stored in the Nodes Collection of the TreeView control. You can get to the information in a specific node in the tree by referring to that node by index, as follows:

TreeView1.Nodes(index)

where "index" is an integer identifying a node in the collection, or by referring to the node with a key value, as follows:

TreeView1.Nodes("key")

where "key" is the string value of the node's key property. The Node object represents a single node from the Nodes Collection:

Dim objNode as Node
Set objNode = TreeView1.Nodes(1)

After the above code executes, objNode will have the same properties as the node identified by

TreeView1.Nodes(1).

Treeview Control topics

See Also


  

.<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved