Dim Node1 As Node
Dim Node2 As Node
Dim Node3 As Node
Dim i As Integer
Dim j As Integer
Dim k As Integer
' For some convenience...
TVClass.HideSelection = False
TVClass.LabelEdit = tvwManual
TVClass.LineStyle = tvwRootLines
' Fill up the treeview...
For i = 1 To 2
Set Node1 = TVClass.Nodes.Add(, , , "Root" & i, 1, 3)
Node1.ExpandedImage = 2
For j = 1 To 3
Set Node2 = TVClass.Nodes.Add(Node1.Index, tvwChild, , "Root" & i & "Child" & j, 1, 3)
Node2.ExpandedImage = 2
Next
Node1.Expanded = True
Next
Dim Node2 As Node
Dim Node3 As Node
Dim i As Integer
Dim j As Integer
Dim k As Integer
' For some convenience...
TVClass.HideSelection = False
TVClass.LabelEdit = tvwManual
TVClass.LineStyle = tvwRootLines
' Fill up the treeview...
For i = 1 To 2
Set Node1 = TVClass.Nodes.Add(, , , "Root" & i, 1, 3)
Node1.ExpandedImage = 2
For j = 1 To 3
Set Node2 = TVClass.Nodes.Add(Node1.Index, tvwChild, , "Root" & i & "Child" & j, 1, 3)
Node2.ExpandedImage = 2
Next
Node1.Expanded = True
Next
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货