Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Treeview automatically selects node when expanding? 1

Status
Not open for further replies.

theweirdo

Programmer
Aug 7, 2002
17
CA
Hi there,

I noticed that TreeView in windows forms seems to automatically select the treenode when the user clicks the plus/minus sign beside it to expand the tree.

I'm having a problem with this because I want something to happen after a treenode has been explicitly selected, not automatically selected when expanding. Is there a way to differentiate between an implicit select and an explicit select?

Thanks.
 
I don't see that.
When a TreeView is shown there is no selection on any items until the TreeView control receives the focus using the mouse or TAB & arrows keys or the focus is set on this control by application.
If a node has the focus e.g. is already selected and it is expanded then the focus remains on that node until a item is selected using the mouse or down arrow. That item will get selected.
-obislavu-


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top