By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,166 Members | 1,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,166 IT Pros & Developers. It's quick & easy.

TreeView Plus Sign to Select Node?

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"B-Dog" <bd***@hotmail.com> schrieb:
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
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #2

P: n/a
Thanks, will try that!

Barclay

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:u8**************@tk2msftngp13.phx.gbl...
"B-Dog" <bd***@hotmail.com> schrieb:
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
///

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>


Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.