Treeview - select Item before rightclick -> contextmenu

  • Thread starter Thread starter LinusHechinger
  • Start date Start date
L

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 ????
 
LinusHechinger said:
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.")
 
Back
Top