Home > Software engineering >  How to obtain the Treeview checkbox index values?
How to obtain the Treeview checkbox index values?

Time:10-03

My original intention is: the initial Treeview shows only 2 layer node, when choosing a certain node check box, display content, the third floor of the node is to know the Set Node3.=TreeView1 Nodes. The Add (2) Index, tvwChild, Key, Text) in 2. The Index value, consult tall person, have what way?

CodePudding user response:

You insert the Key is specified nodes, use 2. The Key!

CodePudding user response:

Unknown, upstairs, please list in detail, you mean the Set Node3.=TreeView1 Nodes. The Add (2) Key, tvwChild, Key, Text), it doesn't work.

CodePudding user response:

 Option Explicit 

Private Sub Form_Load ()
Dim Node1 As Node
Dim 2 As Node
Dim Node3 As Node

TreeView1. Graphics.linestyle=tvwRootLines
Set Node1=TreeView1. Nodes. The Add (, tvwFirst, "K0", "Root")
The Set 2=TreeView1. Nodes. The Add (Node1. Key tvwChild, "K1", "ABC")
Set Node3=TreeView1. Nodes. The Add (2) the Key, tvwChild, "K2", "def")
End Sub
  • Related