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

Customizing Menus Statically

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Complete the following steps to customize a menu statically.

  1. Select Edit»Run-Time Menu to display the Menu Editor dialog box.
  2. Select Custom from the Menu Type pull-down menu.
  3. In the Item Type pull-down menu, select User Item. To add LabVIEW default menu items to a custom menu, select Application Item and select the LabVIEW menu items you want.
Note  If you want to use LabVIEW default keyboard shortcuts in a custom menu, you must add their corresponding default menu items to the custom menu. However, the default keyboard shortcuts for cutting an object, copying an object, pasting an object, displaying the Context Help window, locking the Context Help window, and displaying the LabVIEW Help are included in the custom menu by default.
  1. In the Item Name text box, type a menu item name. The menu item name appears in the Preview field and the Item Tag field. You can modify the tag name to give the menu item a unique identifier. The block diagram uses the tag name to identify the menu item programmatically. Menu item tags can have the same name as menu item names.

    (Windows) You can enter an underscore (_) before a letter you want to be associated with the <Alt> key for that menu. When you associate a letter with the <Alt> key, the user can press the <Alt> key and that key to access the menu. Enter two underscores to display the underscore character in the custom menu.
  2. Place a checkmark in the Enabled checkbox to make the item available to the user. Removing the checkmark dims the menu item, making it unavailable to the user.
  3. Place a checkmark in the Checked checkbox to cause a checkmark to appear next to the menu item. A checkmark is useful for operations that continuously run until the user removes the checkmark from the menu item.
  4. Create a keyboard shortcut in the Shortcut text box. You can use the <F1> to <F24> function keys without using the <Ctrl> key as a modifier key. You must use the <Ctrl> menu key in addition to any other key. (Mac OS) Use the <Command> key. (Linux) Use the <Alt> key.
Note  (Mac OS) Keyboard shortcuts for the function keys work only if the function keys are not assigned as shortcut keys for Exposé.
  1. Click the blue plus button on the toolbar to add more items to the custom menu. Click the red X button to delete items.
  2. Select File»Save As to save the menu file. In the dialog box that appears, name the menu and click the OK button. When you load the VI, the customized menu automatically loads.
  3. Use a Case Structure to execute each menu item.

You can arrange the menu hierarchy in the Menu Editor dialog box by clicking the arrow buttons on the toolbar, using the hierarchy manipulation options in the Edit menu, or by dragging and dropping. You can expand or collapse hierarchies by clicking the submenu glyphs or by choosing from the expand or collapse options in the Edit menu. To add separators, select Separator in the Item Type pull-down menu.


Resources


 

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