Select node/link on context menu right click


I am using GoDiagram Node and Link Template for node and links between nodes.

I need a way to select a node or a link on right click. For mouse left button, selectionchanged event fires and it works fine for mouseleftbutton. However, for mouserightbutton, it doesn’t fire by which node on which I do right click doesn’t get selected.

I tried using mouserightbuttondown event and contextmenuopening event to assign current node on diagram.SelectedNode or diagram.SelectedLink. However this approach is not proper.

Please guide on something if there is available in GoDiagram.

Many Thanks!

By default, context click does select on right mouse button up. Try ProtoApp as an example.

Hi Jake,

Thanks for replying :)

Issue is when I do right
click on a node it gets selected and context menu gets opened and then
when I do right click on second node, context menu open on second node
but that node doesn’t get selected since the previous node still in
selected mode.

I think it loses focus on first right click thats why second node doesnt get selected on click. Still not clear… tried different solutions… still no luck.

that should work too… Try that in ProtoApp with 2 nodes.