ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Context Menu control
  • Overview
  • Handling Context Menu controls programmatically
  • Associating a context menu with a control or page
  • WLanguage functions for handling menus and options
  • WLanguage properties
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
Handling Context Menu controls programmatically
Overview
WEBDEV includes different WLanguage functions and properties to handle Context Menu controls programmatically.
You can handle the menu or its options programmatically: To handle a menu option from the page, use the "<Option name>" syntax.
Handling Context Menu controls programmatically

Associating a context menu with a control or page

You can associate a context menu with a control or page:
  • In the page editor ("Context menu" in the "UI" tab of the description window of the element).
  • Programmatically:
Remark: you can use ControlContextMenu to get the name of the control that opened the current context menu.

WLanguage functions for handling menus and options

The following functions are used to handle Context Menu controls:
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.
MenuDeleteDeletes a menu or a menu option.

WLanguage properties

The following properties can be used on menu options of drop-down or context menus:
CaptionGets and sets the text of a menu option.
CheckedAllows you to use a checkmark () next to a menu option.
NameGets the name of a menu option.
SelectedDetermines if the menu option is selected.
TypeDetermines if the element used is a menu option.
VisibleDetermines if a menu option is visible and shows or hides the option.
For a complete list of WLanguage properties that can be used with Context Menu controls, see Context Menu control properties.
Minimum version required
  • Version 28
Comments
Click [Add] to post a comment

Last update: 04/12/2023

Send a report | Local help