10-04-2017 02:26 PM
We want to disable runtime shortcut menus on all objects on the front panels in our applications, or at least some XY graphs. I've tried:
> unchecking the Allow Runtime Shortcut Menus box in vi properties.
> checking Disable option in the Advanced|Runtime Shortcut Menu for each graph object
>using the Delete Menu Items vi from the Menus palette in an event structure to kill off all the items
They all have the same effect, shutting down the shortcut menus, EXCEPT for the traces or plots shown in the XY graph legend. In all instances the disabling action doesn't touch these, and the shortcut menus still appear when the trace in the legend is right-clicked.
Is this a bug? Anybody know how to work around? I've attached the experiment vi I've been using to try all these options.
Solved! Go to Solution.
10-04-2017 03:00 PM
I do not think this is a bug. The reason is that, you use the plot legend to have these options. If you do not want these options, do not show the plot legend. You can show the names of the different curves by other ways, like creating custom decorations...
One possible workaround: just place a rectangular filled box (i cannot recall it's name from the decorations classic palette) above the graph legend. Make this GUI object transparent. In this way the legend will be visible, but no way to click into it...
10-04-2017 03:21 PM
I'm still thinking that this is a LV bug, but the transparent decoration idea works and gets me out of the hot seat, and I probably wouldn't have thought of it.
Thanks!
10-04-2017 03:39 PM
Oops, guess I accepted that solution too soon. Since I am dynamically resizing some of the graphs to overlay video images, the decorations won't follow them around, being static objects. If they weren't moving targets, this would work fine.
We use the legend to identify the various traces, which I think is what they're primarily for. If we wanted the users to access the runtime shortcuts, we wouldn't be having this discussion.
10-04-2017 04:37 PM
10-04-2017 05:05 PM
Arrgh. Another good suggestion, but the runtime menus still appear even if clicked with left, #1 button, and we want the users to be able to adjust the scales on the graphs without cluttering the panel with a bunch of new controls to do that with property nodes.
I guess one solution is to move the legends to the upper left corner which doesn't move in our apps, and use the transparent decoration box. But that really screws with the establiched layout.
10-04-2017 06:06 PM
Give Leg.Diable (Property of Graph Long Name = Plot Legend Disable) a TRUE
Or At run-time
See the Help here
Your welcome
10-04-2017 06:14 PM
Jeff,
How did I NOT see that?
Megathanks, it really works!
BG
10-04-2017 07:39 PM
@bill_gilbert wrote:
Jeff,
How did I NOT see that?
I'm betting its because its in the advanced RCM of the Graph and not on the RCM Of the Plot Legend where any sane person would look for it. (That helps explain why Blokk missed it too)
Thankfully, I don't get overly hung up on attempting to appear like I have ever had too much sanity.
10-04-2017 08:17 PM
Well, i do not consider myself a sane person 🙂 But I am on holiday with only a smart phone 🙂 I think i could have found the solution if i was able to access LabVIEW 😉