Control

Tree View ActiveX control - version 5.0

File

COMCTL32.OCX

Panel control name

TreeView1

Script

Code

Display About box

TreeView1.AboutBox

Add child node

TreeView1.Nodes.Add &(1:),4,&(2:),&(3:),CInt(&(4:)),CInt(&(5:))
Parameters:
&(1:)=Character - Parent node identifier
&(2:)=Character - Child node identifier
&(3:)=Character - Child node text
&(4:)=Integer - Node image from associated Image list control
&(5:)=Integer - Node image when selected from associated Image list control

Add parent node

TreeView1.Nodes.Add ,,&(1:),&(2:),CInt(&(3:)),CInt(&(4:))
Parameters:
&(1:)=Character - Node identifier
&(2:)=Character - Node text
&(3:)=Integer - Node image from associated Image list control
&(4:)=Integer - Node image when selected from associated Image list control

Clear

TreeView1.Nodes.Clear

Events

TreeView1.ImageList = ImageList1
Sub TreeView1_NodeClick(Node)
&(1:) = Node.Key
&(2:) = Node.Text
Ad.LogicalEvent("TreeView1NodeClick")
End Sub

Parameters:
&(1:)= Character - Identifier of selected node
&(2:)=Character - Text of selected node

Remove node

TreeView1.Nodes.Remove &(1:)
Parameters:
&(1:)=Character - Node identifier