LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

annotation shortcut menu: edit items & handle events

It seems the shortcut menu for annotations are different than for the rest of a graph.  For example, in the following figure I have disabled the shortcut menu for the graph, but if you right-click on the annotation you still get one.

 

annotation shortcut menu.png

 

 

Is there a way to edit the items the items that appear in the annotation shortcut menu?  I'm taking about right-clicking on the annotation or its anchor point.  There are some items that I have to remove from the standard menu.  For example, I need each annotation to be attached to exactly one plot--I don't want any free or attached to all annotations.  There are other menu items for editting annotations that I don't want the user to see either.

 

Also, I need to handle some of the annotation shortcut menu events.  I know that I can have the program watch the list of annotations for changes, but what I really need is to be able to handle shortcut menu events for annotations just like any other control's shortcut menu.

 

And if neither of those are possible, I would like to just diable the annotation shortcut menu and let the parent graph's shortcut menu be in charge.  If this were possible, I could detect if the user has right-clicked over an annotation and build the menu the way I want.

 

But the way things stand, it doesn't look like I can control the annotation shortcut menus at all unless I am missing something.  I'm using 8.5.1, but it looks like 8.6.1 is the same with regard to annotations.

 

Thanks

0 Kudos
Message 1 of 3
(2,685 Views)

Hello travispape,

You are correct that there is no way to edit or disable the run-time short-cut menu for the annotations on an XY Graph, and registering for the event that the XY graph has had a short-cut menu selection does not help, as it does not fire when the user makes a selection from the short-cut menu for the annotation. 

Unfortunately, the only way to get the information that you are trying to get, is to poll the value of the Annotation List property of the XY Graph, and compare it with past values to make sure that nothing has changed.  Please let me know whether or not this is an acceptable solution for you.  I have made a product suggestion on your behalf for future versions to at least have an enable/disable feature for the annotation short-cut menu.

Chris_G
Sr Test Engineer
Medtronic, Inc.
0 Kudos
Message 2 of 3
(2,660 Views)

Ok, that the way things were looking but I was hoping I was just missing a way to control them.

 

As far as the events go, I can get by by monitoring the annotation list for changes. 

 

The biggest issue I have is that there is no way for me to keep the user from getting full control of the annotation with its shortcut menu.  There are several property settings I would like to prevent he user from seeing.  I can mask out setting changes I don't want the user to make to annotations, but I'm not going to win any UI elegance awards for that.

 

Thanks for putting in the product change suggestion for me.  By the way, it is actually a mixed signal graph that I am using, but the annotation behavior is the same.

 

Travis

0 Kudos
Message 3 of 3
(2,655 Views)