Re: TreeView: right-click

Patrick Steele <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.winforms
Message-ID <006d01c78fd3$9bdd9510$6901a8c0@X60T>
In the MouseDown (or maybe MouseUp) event, if the right-mouse was
clicked, set the SelectedNode property to the Node that was clicked on.

---
Patrick Steele
http://weblogs.asp.net/psteele


-----Original Message-----
From: Discussion forum for developers using Windows Forms to build apps
and controls [mailto:[email protected]] On Behalf Of
Peter Osucha
Sent: Sunday, May 06, 2007 1:34 AM
To: [email protected]
Subject: [DOTNET-WINFORMS] TreeView: right-click


And since it's late and my brain isn't working well right now, one
more...

I have a TreeView control on a form with a bunch of nodes displayed.  If
I 'left-click', the treeview highlight shows on the item I clicked.
However, if I 'right-click', it doesn't.  How do I change the TreeView's
behavior so that the 'right-click' moves the highlight just like the
'left-click' does (the same behavior that happends in Windows Explorer),
please?

Peter
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.