AddNode Method
Object List Next Object
Defined By: TreeView
Description:
Add another node to the TreeView control.
Declaration:
Function AddNode(relative As Node, ByVal isChild As Boolean, ByVal text As String, ByVal image
As Integer, ByVal selectedImage As Integer, ByVal expandedImage As Integer) As
Long
Details:
This method allows you to add another node to the TreeView control and specify
it’s placement within the TreeView as well as which bitmap images are to be used
for it’s various states. The relative parameter is used to specify the node relative to which the new node will be
added. If isChild is True, then the new node will be added as a child of the relative node,
otherwise, it will be added after the last sibling of relative. If relative is Nothing, then the new node is added at the root level.
The image, selectedImage, and expandedImage parameters specify the indices into the TreeView’s associated ImageList for the bitmaps to use when the Node is in a normal,
selected, or expanded state.
AddNode returns a Long, which represents a key value which may be used at a
later time to look up the node object via the Nodes method.
See Also: