ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Drop-down menus / WEBDEV
  • Overview
  • The different operations
  • Changing the caption of a menu option
  • Adding a menu option
  • Adding a separator
  • Adding a submenu
  • Deleting a menu option
  • Configuring the options of a Popup menu (drop-down menus only)
  • Overview
  • Creating the options of a popup menu
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
The context menu of menu options allows you to perform all the operations required to define:
  • a drop-down menu.
  • WEBDEV - Server code a context menu.
To handle the options of a drop-down menu:
  • Select the menu.
  • Click the selected menu: a yellow border appears.
  • The menu switches to edit mode. You can right-click the menu options to add other options.
To handle the options of a context menu:
  • Do one of the following to open the Context Menu control:
    • double-click its name in the "Project explorer" pane.
    • on the "Page" tab, in the "Edit" group, expand "Context menus" and select "<ContextMenuName>".
  • Select an option. You can right-click the menu options to add other options.
Remarks:
  • Press Esc to exit edit mode (the yellow border will disappear).
  • To edit the text of an option in a drop-down or context menu, simply select the option and press Space (or select "Edit option caption" in the context menu): a yellow border appears.
  • To associate an action with a menu option, you can use the description window of menu option or the code associated with the option. For more details, see Programming a drop-down menu.
  • To create a popup drop-down menu, simply associate the menu option with a popup in the page. For more details, see Popup menu options.
  • The following functions can be used to add options to an existing context or drop-down menu:
    MenuAddMenuAdds a new menu to an existing drop-down or context menu of a window or page.
    MenuAddOptionAdds a new option after the last option of a drop-down or context menu.
    MenuAddPopupTransforms a menu option of a page in order for this option to open a popup.
    MenuAddSeparatorAdds a new separator in a menu (drop-down or context menu).
    MenuAddURLOptionAdds a new option after the last option of a drop-down or context menu. This menu option opens the page that corresponds to the specified URL.
The different operations

Changing the caption of a menu option

To change the caption of a menu option:
  1. Select the option.
  2. Press the Space key.
  3. Type the new caption and press the Enter key to validate.

Adding a menu option

To add a menu option:
  1. To add a menu option after a given position, right-click the desired menu option and select "Add option after".
  2. Press Enter.
  3. Type the text of the new option and press Enter to confirm.
Remark: The Esc key is used to cancel the addition of a menu option.

Adding a separator

To add a separator:
  1. Select the submenu option after which the separator should be added.
  2. Right-click to open the context menu of the option.
  3. Select "Add a separator".

Adding a submenu

To add a submenu:
  1. Select the menu option to which a sub-option must be added.
  2. Right-click to open the context menu of the option.
  3. Select "Insert a submenu".
  4. Press the Space key.
  5. Type the text of the first option of the new submenu.
  6. Press Enter to validate the addition.
Remarks:
  • You can use the same method to add options in menus and sub-options in submenus.
  • WEBDEV - Server code Submenus in context menus: You can define the orientation of the submenus in the description window of the context menu:
    • Vertical Popup (default): The submenu of a context menu option opens next to the parent option.
    • Vertical Drop-down: The submenu of a context menu option opens below the parent option.
    The selected option can be viewed directly in the context menu edit window.

Deleting a menu option

To delete a menu option:
  1. Select the menu option to delete.
  2. Right-click to open the context menu of the option.
  3. Select "Delete".
Remark: You can also delete the current menu option with the Delete key.
Configuring the options of a Popup menu (drop-down menus only)

Overview

In a "Popup" menu, hovering over an option in the menu bar opens an entirely customizable Popup page.
The popup page makes it easy to create graphic menus. You have the ability to insert any type of control into the popup.

Creating the options of a popup menu

To create the options of a popup menu:
  1. Display the menu in edit mode: the menu must be enclosed by a yellow line.
  2. Select the menu option that must display the popup page.
  3. Display the popup menu of the option (right mouse click) and select "Expand a popup page".
  4. The "UI" tab of the description window of the menu option is displayed. In this window:
    • Select the popup page that must be displayed. If the popup page does not exist, click "<New popup>" to create it.
    • Select the position of the popup in relation to the option (below, on the right, on the left, ...).
  5. Confirm changes and close the description window. If you have chosen a new popup, the popup appears in creation in the editor.
  6. The popup associated with the option can also be viewed in the editor:
    • display (if necessary) the menu in edit mode (with the yellow border).
    • click the menu option associated with the popup.
Remark: You also have the ability to transform an existing menu option into an option that opens a popup:
  1. Display the menu in edit mode: the menu must be enclosed by a yellow line.
  2. Right-click to open the context menu of the option and select "Option description".
  3. In the "UI" tab, select the popup window that must be associated with the option.
Minimum version required
  • Version 9
Comments
Click [Add] to post a comment

Last update: 01/17/2024

Send a report | Local help