07-03-2012 11:35 AM
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
07-03-2012 11:40 AM
http://zone.ni.com/reference/en-XX/help/371361E-01/lvhowto/shortcut_menus/
07-05-2012 08:34 AM
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
07-05-2012 12:08 PM - edited 07-05-2012 12:12 PM
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 😞 )
05-03-2017 05:06 AM
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