Discussion:
Treeview - select Item before rightclick -> contextmenu
(too old to reply)
LinusHechinger
2009-10-14 06:31:19 UTC
Permalink
i've got a treeview and a contextmenu opening
for it.
But got the problme, whe suing rightclick
there's a item selecte, thats not "under" the cursor,
so my options performed with the selectet
item in the contextmenu work with another item....

How to change the selected item befor contextmenu opens
to the one which is -under- the cursor ????
Armin Zingler
2009-10-14 11:37:33 UTC
Permalink
Post by LinusHechinger
i've got a treeview and a contextmenu opening
for it.
But got the problme, whe suing rightclick
there's a item selecte, thats not "under" the cursor,
so my options performed with the selectet
item in the contextmenu work with another item....
How to change the selected item befor contextmenu opens
to the one which is -under- the cursor ????
See my reply in microsoft.public.dotnet.framework.windowsforms.

(It is:
"Handle the MouseDown event. Select the item under the mouse
if the right button has been pressed. Call the TVW's GetNodeAt
method to determine the node to be selected.")
--
Armin
Loading...