Private Sub Tree1_NodeClick(ByVal Node As ComctlLib.Node) If Node.Child Is Nothing Then MsgBox Node.Text Else Node.Expanded = Not (Node.Expanded) End IfEnd Sub
打开hot track就好了,属性中有
我刚用完 Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node) If Node.Parent Is Nothing Then If Node.Expanded Then Node.Expanded = False Else Node.Expanded = True End If End If End Sub
--------------------------
亮剑工作室
If Node.Child Is Nothing Then
MsgBox Node.Text
Else
Node.Expanded = Not (Node.Expanded)
End IfEnd Sub
Private Sub TreeView1_NodeClick(ByVal Node As MSComctlLib.Node)
If Node.Parent Is Nothing Then
If Node.Expanded Then
Node.Expanded = False
Else
Node.Expanded = True
End If
End If
End Sub