Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Customizing Run-Time Shortcut Menus for Front Panels Programmatically

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

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

  1. Place an Event structure on 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. Place the Insert Menu Items function on 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.

Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit