PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

  • Adding menu options into the popup menu
  • Popup menu and group of controls
  • Changing the context menu and storing information about the Table controls
  • Limitations
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
The PopupMenu property is used to:
  • Find out the custom context menu associated with a control or window.
  • Modify the context menu associated with a control or window (associate another context menu with the control or window).
  • Customize the system menus of controls by adding options.
Reminder: A popup menu is a menu that is opened by the user via a right mouse click. A popup menu is created in the window editor during the control description ("UI" tab). For more details, see Managing the popup menus.
The arrow found on the right of control is used to edit or create a popup menu in the menu editor.
Remark: Some types of controls (edit controls, tables, ...) have a default context menu (displayed if no custom context menu is associated with the control). This system menu can also be disabled.
Versions 15 and later
Android This property is now available for Android applications.
New in version 15
Android This property is now available for Android applications.
Android This property is now available for Android applications.
Versions 20 and later
iPhone/iPad This property is now available for iPhone/iPad applications.
Android This property is now available for Table controls and table columns in Android applications.
New in version 20
iPhone/iPad This property is now available for iPhone/iPad applications.
Android This property is now available for Table controls and table columns in Android applications.
iPhone/iPad This property is now available for iPhone/iPad applications.
Android This property is now available for Table controls and table columns in Android applications.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Code used to modify the context menu associated with the button
// Popup1 and Popup2 are existing popup menus
IF BTN_Button1.PopupMenu = "Popup1" THEN
BTN_Button1.PopupMenu = "Popup2"
ELSE
// Restores the default AAF popup menu
BTN_Button1.PopupMenu = ""
END
// Initialization code of edit control
// Adds the Popup1 menu after the system context menu of control
// Popup1 is an existing popup menu
MySelf.PopupMenu = "+Popup1"
Syntax

Finding out the context menu associated with a control or window Hide the details

<Menu> = <Element>.PopupMenu
<Menu>: Character string
  • Name of custom context menu associated with the object,
  • Empty string ("") if no custom popup menu is associated with the object.
<Element>: Control name or window name
Name of control or window for which the name of custom context menu is requested.

Modifying the context menu associated with a control or window Hide the details

<Element>.PopupMenu = <Name of new menu>
<Element>: Control name or window name
Name of control or window whose popup menu will be modified.
<Name of new menu>: Character string or constant
Name of new custom context menu associated with the object (empty string to restore the system context menu).
To add a popup menu to the system menu, you must:
  • write the "+" sign in front of the menu name (to display the new menu after the options of system menu).
  • write the "+" sign after the menu name (to display the new menu before the options of system menu).
  • specify an empty string ("") to use the AAF default context menu.
You also have the ability to use the following constants:
PopupMenuDisabledUsed to disable the display of all the popup menus (including the system popup menus or the popup menus for the Currency + Euro edit controls).
Universal Windows 10 AppAndroid This constant is not available.
PopupMenuSystemUsed to disable the display of menu options specific to the AAFs (Automatic Application Features). Only the Windows popup menu is displayed.
Also allows you to access the Unicode options available for some Windows systems ("Read from right to left, Display the Unicode control characters, ...").
Universal Windows 10 App This constant is not available.
Remarks

Adding menu options into the popup menu

The PopupMenu property cannot be used to cumulate the custom context menus associated with a control. However, you can add options to an existing context menu using MenuAddMenu, MenuAddOption, ... For more details, see Menu management functions.

Popup menu and group of controls

A popup menu can be associated with a group of controls: all the controls belonging to the group will have the same popup menu. In read mode, <Result> always corresponds to an empty string ("").

Changing the context menu and storing information about the Table controls

When changing the popup menu, the persistent information previously saved for the Table control (size of columns, ...) is not available anymore. This information is re-initialized.

Limitations

The PopupMenu property applies only to controls in a window (including columns in Table controls). This property cannot be used with the menus, etc.
The PopupMenu property does not apply to the following controls:
  • Static
  • Non-clickable image
  • Progress Bar
  • Shape
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment