# Menu Bar Definition

> Source: https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/menu-bar/menu-bar-definition

The **Menu Bar Definition** dialogue is used to define the attributes for a menu bar that will be added along the top of a panel. It is invoked from the **[Panel Designer](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/introduction)** by selecting *Panel* > *Menus* on the menu bar.

A sample menu bar definition is displayed below:

![Menu Bar Definition for Design window, showing the Groups tree, Contents Of list, and toolbar including the Menu Colors button and Suppress Help check box.](https://manual.pvxplus.com/migration-assets/0bf0a02370a125f1e37e4360b6924ba7f2478304f53d756f045667ba849f2529.png)

This dialogue consists of the following:

|  |  |
| --- | --- |
| **Groups** | Lists the currently defined groups or menu levels. This shows existing \<Top Level> menu definitions, if any. If subordinates are added to a menu item, a menu expansion symbol (**+**) appears next to the menu item.<br>***Example:***<br>A "&Sales" menu item with the subordinate "&Commissions" would display in the **Groups** list box as "+ &Sales". |
| *Contents Of* | Lists the sub-menus that belong to a menu's group. This allows you to add subordinates to menu groups (up to eight levels). Double click on an existing item or group to edit its properties. |

The ***toolbar*** consists of the following:

|  |  |
| --- | --- |
| *Save* | Saves the current Menu Bar definition. If the *Menu Bar* attribute has not been set in the **[Panel Header](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/panel-header/overview#attributes)** definition, a message will prompt you to set this attribute. |
| *Delete Menu* | Deletes the entire Menu Bar definition currently selected. |
| *New Item* | Invokes **[Menu Item/Group Definition](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/menu-bar/creating-a-menu-item-and-group)** for defining a new item. |
| *New Group* | Invokes **[Menu Item/Group Definition](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/menu-bar/creating-a-menu-item-and-group)** for defining a new group. |
| *Menu Link* | Invokes **[Menu Link Definition](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/menu-bar/menu-link)** for defining a menu link. |
| *Delete Item* | Deletes a selected menu item or group (same as pressing the Delete key). If selecting a group, its subordinate groups and items are also deleted. |
| *Cut* | Cuts the selected menu item or group (all subordinates included). |
| *Copy* | Copies the selected menu item or group (all subordinates included). |
| *Paste* | Pastes a copied/cut item or group to the highlighted position. Items or groups can be pasted to another level in the same Menu Bar or to a Menu Bar on a different panel.<br>If pasting a copied/cut item or group with an Alt key that is currently assigned to an existing item or group, a **Duplicate Alt Key** dialogue will display to allow a different Alt key to be selected.<br>*(The Duplicate Alt Key dialogue was added in PxPlus 2019.)* |
| *Move Up/Down* | Changes the order of the selected item or group within the *Item* list box. |
| *Suppress Help* | Check box to remove the *Help* menu from the Menu Bar. If not set, NOMADS will use the *Help* file defined in the **[Panel Header](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/panel-header/overview)**. |
| *Menu Colors* | ***(NOMADS Only)***<br>Click this button to invoke the **Define Menu Colors** dialogue to define menu colors specific to this menu.<br>*(The Menu Colors button was added in PxPlus 2024.)*<br>See **[Menu Colors](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/menu-bar/menu-colors)** to determine how to define colors and how the various colors are applied at run time.<br>![Define Menu Colors dialogue showing Text, Background and Edge color fields, an Apply Menu Colors to Top Menu option, and a Visual Class selection.](https://manual.pvxplus.com/migration-assets/11a520dec4a654ddb947a6374c16cacd86d152d0f54c37d7fe4f8dc29b651b88.jpg)<br>This dialogue consists of the following:<br>\|  \|  \|<br>\| --- \| --- \|<br>\| **Menu Colors** \| *Text*<br>Applies a text color to the menu items.<br>Click the Query button to access **[Color Selections](https://manual.pvxplus.com/nomads-graphical-application/appendix/color-selections)**. Valid formats for color selections include predefined system colors (e.g. Light Red), Custom (RGB codes), HTML Hex Color Codes, User Defined colors (e.g. Color17) and string Expressions.<br>*Background*<br>Applies a background color to the menu.<br>Click the Query button to access **[Color Selections](https://manual.pvxplus.com/nomads-graphical-application/appendix/color-selections)**. Valid formats for color selections include predefined system colors (e.g. Light Red), Custom (RGB codes), HTML Hex Color Codes, User Defined colors (e.g. Color17) and string Expressions.<br>*Edge*<br>Applies a background color to the left edge portion of the menu.<br>Click the Query button to access **[Color Selections](https://manual.pvxplus.com/nomads-graphical-application/appendix/color-selections)**. Valid formats for color selections include predefined system colors (e.g. Light Red), Custom (RGB codes), HTML Hex Color Codes, User Defined colors (e.g. Color17) and string Expressions.<br>*Apply Menu Colors to Top Menu*<br>Option that is used to apply the *Text* and *Background* menu colors to the top level of the menu bar. Available selections are *Default*, *Yes*, *No*:<br>*Default*<br>Use the system default setting.<br>*Yes*<br>Apply the colors to the top menu levels.<br>*No*<br>Do not apply the colors to the top menu levels.<br>*(The renaming of the options "Item Color" to "Background" and "Edge Color" to "Edge" was added in PxPlus 2024.)  <br>(The "Text" and "Apply Menu Colors to Top Menu" options were added in PxPlus 2024.)* \|<br>\| **Visual Class** \| Assign a visual class to the menu.<br>Click the Visual Class Maintenance button to launch the **[Visual Classes Maintenance](https://manual.pvxplus.com/nomads-graphical-application/system-maintenance-tools/system-options/visual-classes)** utility for creating or editing visual classes.<br>To assign visual classes to controls at the ***library*** level, see **[Visual Class Assignment](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/maintaining-library-objects/visual-class-assignment)**.<br>Note:  <br>Visual class names that begin with an "\*" (asterisk) are predefined visual classes used by PVX Plus and may be subject to change without notice. \| |

After saving a new Menu Bar definition, select the *Menu Bar* check box on the **[Attributes](https://manual.pvxplus.com/nomads-graphical-application/panel-designer/panel-header/overview#attributes)** tab in the **Panel Header** definition (if not already selected) to display the menu on the panel.
