Edit Menu Bar Dialog Box
Use the Edit Menu Bar dialog box to create and edit menu bars for a user interface. At the top of the dialog box, LabWindows/CVI displays a preview of the menu bar as you create it.
You can access the Edit Menu Bar dialog box in the following ways:
- Right-click Menu Bars in the User Interface Browser and then select Create.
- Right-click a menu bar in the User Interface Browser and then select Edit.
- Select Create»Menu Bar in the User Interface Editor.
- Select Edit»Menu Bars in the User Interface Editor and click Create or Edit in the Menu Bar List dialog box.
- Right-click an area of the User Interface Editor that does not contain a panel and select Menu Bar.
The Edit Menu Bar dialog box contains the following options:
- Menu Bar Settings
- Menu bar constant prefix—Sets the resource ID for the menu bar. Pass this resource ID to LoadMenuBar to load the menu bar into memory. The menu bar constant prefix is defined in the .h file that LabWindows/CVI generates when you save the .uir file. If you do not assign a menu bar constant prefix, the User Interface Editor assigns one for you when you save the .uir file.
- Menu bar encoding—Specifies the character encoding for the menu bar. Select UTF-8 or ANSI.
- Customize Font—Opens the Edit Menu Bar Font dialog box, which you can use to specify a font for the menu bar.
- Menu/Menu Item/Submenu Settings
- Constant name—Sets the constant name of the menu, submenu, or menu item, which LabWindows/CVI appends to the menu bar constant prefix to form the ID for the current object. Pass the ID to functions such as GetMenuBarAttribute and SetMenuBarAttribute. GetUserEvent returns the ID when the current menu, submenu, or menu item generates a commit event.
- Item name—Sets the name of the current menu, submenu, or menu item. If you type a double underscore before any letter in Item name, the letter appears underlined in the label. The user can select the menu item by pressing <Alt> and that letter.
- Callback function—This field is optional. Type the name of the function to call when the current menu, submenu, or menu item generates an event.
- Image column color—Specifies the color to use in the column where images appear in the menu. This option is dimmed until you enable Show images. This option is available only for menus and submenus.
- Show images—Specifies whether to allow images for menu items. When you select this option, LabWindows/CVI adds a column in the menu for images. This option is available only for menus and submenus.
- Modifier key—Identifies the keys, along with Shortcut key, that users can press to execute the current menu item. This option is available only for menu items.
- Shortcut key—Identifies the keys, along with Modifier key, that users can press to execute the current menu item. This option is available only for menu items. Virtual keys do not require modifiers but ASCII keys require at least one modifier. You cannot use a dual-byte character as a shortcut key.
- Dimmed—Specifies whether the menu, submenu, or menu item is initially dimmed.
- Checked—Specifies whether the menu item initially has a checkmark. This option is available only for menu items.
- Bold—Specifies whether the menu item is initially bold. This option is available only for menu items.
- Image—Opens the Menu Item Image dialog box, which you can use to associate an image with a menu item or submenu. This option is not available for top-level menus.
- Insert Item—Inserts a new item below the currently selected menu item.
- Insert Child Item—Inserts a new sub-item below the currently selected menu item.
- Insert Separator—Inserts a separator below the currently selected menu item.
- Move Up—Moves the currently selected item up one item in the menu hierarchy.
- << Change Level—Moves the currently selected menu item up one level in the menu hierarchy.
- Change Level >>—Moves the currently selected menu item down one level in the menu hierarchy.
- Move Down—Moves the currently selected item down one item in the menu hierarchy.
- Cut—Deletes the currently selected menu item and copies it to the menu clipboard.
- Copy—Copies the currently selected menu item to the menu clipboard.
- Paste—Inserts the menu item currently on the menu clipboard below the currently selected menu item.
- Paste Child—Inserts the item currently on the menu clipboard as a child of the currently selected menu item.
- Delete—Removes the currently selected item from the menu.