Originally Posted by
yosilb
hi
how can I distinguish when the user clicking a node and when the user clicking the + sign of the node
thanks
i believe you would do that in the NodeMouseClick or NodeMouseDoubleClick event
then in the event, you can do this to see if the node is expanded (-) or not expanded (+) like this
vb Code:
Private Sub TreeView1_NodeMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.TreeNodeMouseClickEventArgs) Handles TreeView1.NodeMouseClick
If e.Node.IsExpanded Then ' (-)
Else 'not expanded (+)
End If
End Sub
if you want to find the selected node, you would do
vb Code:
If e.Node.IsSelected Then
End If