TreeView Plus Sign to Select Node?

  • Thread starter Thread starter B-Dog
  • Start date Start date
B

B-Dog

I was trying to use the treeview and was wondering if there was a way to
make the treeview select the node when you click the plus sign next to it.
The only way I've found to do it is to actually click on the node name and
then it will show it selected. I'd like to change to selected when you
click the plus sign. Is this possible. Thanks
 
B-Dog said:
I was trying to use the treeview and was wondering if there was a way to
make the treeview select the node when you click the plus sign next to it.
The only way I've found to do it is to actually click on the node name and
then it will show it selected. I'd like to change to selected when you
click the plus sign.

\\\
Private Sub TreeView1_ExpandOrCollapse( _
ByVal sender As Object, _
ByVal e As TreeViewEventArgs _
) Handles TreeView1.AfterCollapse, TreeView1.AfterExpand
Me.TreeView1.SelectedNode = e.Node
End Sub
///
 
Thanks, will try that!

Barclay

Herfried K. Wagner said:
\\\
Private Sub TreeView1_ExpandOrCollapse( _
ByVal sender As Object, _
ByVal e As TreeViewEventArgs _
) Handles TreeView1.AfterCollapse, TreeView1.AfterExpand
Me.TreeView1.SelectedNode = e.Node
End Sub
///
 
Back
Top