Customizing Run-Time Shortcut Menus for Front Panels Programmatically

LabVIEW 2018 Help


Edition Date: March 2018
Part Number: 371361R-01
View Product Info

DOWNLOAD (Windows Only)


LabVIEW 2016 Help
LabVIEW 2017 Help
LabVIEW 2018 Help
LabVIEW 2019 Help
LabVIEW 2020 Help

Complete the following steps to customize a shortcut menu for the front panel of a VI programmatically.

  1. Add an Event structure to the block diagram and drag out a region on the block diagram.

  2. Right-click the Event structure and select Edit Events Handled by This Case from the shortcut menu.
  3. In the Edit Events dialog box, select Pane from the Event Sources list and select Shortcut Menu Activation? from the Events list.
    Note  LabVIEW labels the first pane as Pane. LabVIEW labels subsequent panes that you create by adding splitter bars to the front panel as Pane X, where X numbers the pane according to the order in which you create the pane. You can view the label of the pane by right-clicking the scroll bar of the pane and selecting Visible Items»Labels from the shortcut menu.
  4. Click the OK button to close the dialog box.
  5. Add the Insert Menu Items function to the block diagram inside the Shortcut Menu Activation? Event structure.

  6. Right-click the item names input of the Insert Menu Items function and select Create»Constant from the shortcut menu. An array constant appears.
  7. Type About this Application in element 0 and Help in element 1 of the string array constant.
  8. Wire the MenuRef event data field to the menu reference input of the Insert Menu Items function.
  9. Click the Run Continuously button.
  10. Right-click in the front panel window. The shortcut menu includes an About this Application item and a Help item.
  11. Configure a Shortcut Menu Selection event to handle the selection of the items.

WAS THIS ARTICLE HELPFUL?

Not Helpful