# Popup Menu

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

Popup menus are designed to "pop up" over the current window when you right-click on selected panel controls (buttons, multi-lines, list boxes, etc.). They are much like the drop-down menus appearing on a menu bar, except that they can be placed anywhere on the panel and are only visible when invoked.

The definition of a popup menu is similar to other menus in that you can provide a list of items where each one triggers a different event. While a **[Menu Bar](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/menu-bar/overview)** contains multiple menus and has a fixed location along the top of a panel, popups remain invisible until the user right-clicks on a popup-enabled control.

A system popup menu consisting of extraction, search and print options can also be added to any grid or list box (except Tree Views). See **[List Box and Grid System Popup Menu](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/popup-menu/list-box-and-grid-system-popup-menu)**.

## Popup Menu Definition

Unlike standard menus, popup menus do not belong to a specific panel and are considered separate *library objects* (listed in **[Library Object Selection](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/library-object-selection/overview)** with a *Type* **P** designation).

The **Menu Bar Definition** dialogue is used to create and edit popup menu objects. It is invoked from Library Object Selection in a few ways: by clicking the *Menu* button (if using **[Toolbar View](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/library-object-selection/menu-options#views)**), by selecting *Objects* > *Popup Menu Object* on the menu bar, or by double clicking on a listed popup menu object.

You can also select the **[Menu Bar Definition](https://manual.pvxplus.com/nomads-graphical-application/nomads-development/menu-bar-def-ide)** task on the IDE Main Launcher.

*(The Menu Bar Definition task on the IDE was added in PxPlus 2023 Update 1.)*

Note:  
When entering a new name for a popup menu object, valid characters are: letters (A-Z, a-z); numbers (0-9); ~ (tilde); @ (at symbol); . (period); $ (dollar sign); \_ (underscore); - (dash); + (plus sign). If an invalid character is used, a message will display.

A sample popup menu definition is displayed below:

![](https://manual.pvxplus.com/migration-assets/8970cf3cc3f2822ff981bc33b1190194e8acb810e22f2d3c490af54807a36898.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 definition. |
| *Delete Menu* | Deletes the entire menu 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 System Edit Options* | ***(Multi-Lines Only)***<br>Check box to suppress system edit options (i.e. Cut, Copy, Paste, etc.) from the right-click popup menu. |
| *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>![](https://manual.pvxplus.com/migration-assets/17903546f83f4254659f6f0b8499f0c34a301cb4f07b0c566e5fe5b3eccf23a0.png)<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>*(The renaming of the options "Item Color" to "Background" and "Edge Color" to "Edge" was added in PxPlus 2024.)  <br>(The "Text" option was 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. \| |

Many of these same options and properties are used to create standard menus. To define the menu bar attributes for a panel, see **[Menu Bar Definition](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/menu-bar/menu-bar-definition)**.

You can also create and edit a popup menu via the Panel Designer. See **[Applying a Popup Menu](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/popup-menu/applying-a-popup-menu)**.

***Adding a Popup Menu to a Project***

You can also select to add the popup menu to a new or existing project by selecting *Projects* from the menu bar. The following options are available:

|  |  |
| --- | --- |
| *Create New Project* | Launches the **[Create Project](https://manual.pvxplus.com/pxplus-ide/ide-main-launcher#createproject)** dialogue for entering a new project for the current working directory. Click the Query button to select a different working directory. |
| *Add to Project* | Launches the **Add to Project** dialogue for adding the current task to an existing project that is selected from the *Project* drop box.<br>To manage all the tasks within a project, see **[Project Maintenance](https://manual.pvxplus.com/project-maintenance)**.<br>For information on adding tasks to a project from other locations, see **[Adding Tasks to Projects from Other Locations](https://manual.pvxplus.com/pxplus-ide/adding-tasks-to-projects-from-other-locations)**. |

## See Also

**[List Box and Grid System Popup Menu](https://manual.pvxplus.com/nomads-graphical-application/creating-panel-controls/popup-menu/list-box-and-grid-system-popup-menu)**
