08-30-2013 06:27 PM
I am using LabVIEW 2012 DS2.
I have created a custom cluster control and associated a run-time menu with the control. This control is used on the front panel to display test status.
When I right-click in an open area of the cluster or on a disabled control then I get the event "Shortcut Menu Selection (User)" as well as "Shortcut Menu Activation?", but when the control is enabled then I do not get the "Shortcut Menu Activation (User)" event but only get the event "Shortcut Menu Activation?" with the SubObj displaying the control within the cluster that the right click was detected. When the control is disabled then the SubObj is set to Not a Refnum so I can use this field to determine whether the control within the cluster has been handled and then manually display the run-time menu.
I was going to create an XControl to handle the processing and display the Run-Time menu for enabled controls. Is there an easier way to do this?
Why is the right click detected for enabled controls but the run-time menu not displayed?
08-30-2013 09:56 PM
You dont need any Shortcut Menu Selection (User)" as well as "Shortcut Menu Activation?"
Just change the run time menu from edit menu and run it. Run the VI I attached and do accordingly.
09-03-2013 12:48 PM
I had already changed menu to edit ... I get the RTM on right click only when control is disable not when it is enabled. The controls are in a cluster. You are attaching an RTM to a VI while I am attaching it to a control within the VI.
09-03-2013 01:06 PM
Is the menu associated with the entire cluster, or with a specific control within the cluster?
If the custom menu is associated with the entire cluster, it might explain what you are seeing. Each control within the cluster will likely have its own run-time menu, so when the cluster is enabled, you will be seeing the menu associated with the individual control, rather than the cluster. When the cluster is disabled, perhaps this is the only time you can see the menu for the overall...(?)
Perhaps this is an explanantion for the behaviour you are seeing.
-- Dave
09-03-2013 02:56 PM
It is associated with the entire cluster but I also associated the same RTM with each of the controls within the cluster to see if that solved the issue but it didn't.
The entire cluster cannot be disabled only controls within the cluster. I have a start/stop button that only displays the RTM when disabled but LV sees the right click when enabled but does not display the RTM.