LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

disable short cut menu for annotation

Hi All,

How can I disable short cut menu for annotations on the graph? I have a custom run time menu for the graph which I want to show but disable the run time menu for Annotations.

 

Thanks,

Ritesh

0 Kudos
Message 1 of 5
(3,188 Views)
0 Kudos
Message 2 of 5
(3,187 Views)

Hi TailOfGon,

I want to disable only the annotation shortcut menu, but want to show the shortcut menu of graph. Then link you posted shows how to disable the runtime menu of graph.

So, if the cursor is on the annotation and I right click on it, it shows the run time menu of the annotation, which I want to disable.

 

Thanks,

Ritesh

0 Kudos
Message 3 of 5
(3,171 Views)

Oops, sorry I should have read your post more carefully. It is possible by dynamically deleting the menu items at the time of menu activation. Look at the png file.

Or, you can you "Set Menu Item Info" to disable with gray out. If you want more items to delete or disable, use "Get Menu Item Info" to obtain the array of item tags. (Please ignore the bad programming practice where I set False to the While Loop 😞  )

TailOfGon
Certified LabVIEW Architect 2013
0 Kudos
Message 4 of 5
(3,167 Views)

Probably a bit late, but I found the following solution to suppress the annotations short-cut menu:

1. In the mouse down? filter event, (temporarily) clear the annotations list

2. In the mouse down event, restore the annotations list

This effectively prevents the menu to appear and shows the "normal" shortcut menu instead. 

 

Harm

 

Message 5 of 5
(2,741 Views)