How I Can Customize the Run Time Shortcut Menu in an Array

Updated Aug 20, 2020



  • LabVIEW
  • LabVIEW Runtime

I am creating an application, and I want to have a customize shortcut menu for when the user click the array and another menu when the user click an element in the array.

You can customize the shortcut menu programmatically using event structures, in the following way.
  1. If still it not in the code, add an event Structure.Right-click on the Diagram Block Programming>> Structures>> Event Structure
  2. Create an Event Case for the Array to detects the Shortcut Menu Activation? event. Right-click on the Event Structure>>Add Event Case.  In the window, select the Control Array>>Shortcu Menu>>Shortcut Menu Activation?      
  1. Verify is the menu for the array or for an element was activated using the SubObj reference and the Not A Number/Path/Refnum?.vi
  2. Create a case structure and wire the Not A Number/Path/Refnum?.vi to the selector. In each case delete the Menu using the Delete Menu Items. vi and build the menu for the array using the Insert Menu Items. vi, you need to indicate the name and the tag of item. The items inseted in the menu depend on what you want to show, in the True Case (when the the SubObj is not a reference) include the items for the array menu, and in the false case include the items for the element menu.

When you run you application .exe you could see that shortcut menu customize for each case.
The case for the Array Shortcut Menu

The case for the Element Shortcut Menu