|
|
|
|
|
- Adding menu options into the context menu
- Context menu and group of controls
- Horizontal Table control
- Changing the context menu and storing information about the Table controls
- Limitations
ContextMenu (Property) In french: ContextMenu
Not available
Warning
From version 28, PopupMenu is kept for backward compatibility. This property has been replaced with ContextMenu.
The ContextMenu property is used to: - Get the custom context menu of a control, window or page.
- Change the custom context menu of a control, window or page (or associate another context menu).
- Customize the system menus of the controls by adding options.
Note Some field types (Edit control fields, Table fields, etc.) have a default system menu (displayed if no custom context menu is associated with the field). This system menu can also be disabled.
New in version 2025For more details, see:
IF BTN_Button1.ContextMenu = "Popup1" THEN
BTN_Button1.ContextMenu = "Popup2"
ELSE
BTN_Button1.ContextMenu = ""
END
MySelf.ContextMenu = "+Popup1"
Syntax
Getting the context menu of a control, window or page Hide the details
<Menu> = <Element>.ContextMenu
<Menu>: Character string - Name of custom context menu associated with the object,
- Empty string ("") if no custom context menu is associated with the object.
<Element>: Control, window or page name Element for which the name of the context menu should be retrieved: - Control name,
- Window name,
- Page name.
Changing the context menu of a control, window or page Hide the details
<Element>.ContextMenu = <New menu>
<Element>: Control, window or page name Name of the element for which the context menu should be modified: - Control name,
- Window name,
- Page name.
<New menu>: Character string or constant - Name of custom context menu associated with the object.
- If the menu name is preceded by a "+" sign, the new menu will be displayed after the menu system options.
- If the menu name is followed by a "+" sign, the new menu will be displayed before the system menu options.
- Empty string to retrieve the system context menu.
- One of the following constants:
| | contextMenuDisabled | Used to disable the display of all the context menus (including the system context menus or the context menus for the Currency + Euro edit controls). This constant is not available. | contextMenuSystem | Disables the menu options specific to the AAFs (Automatic Application Features). Only the Windows (or web browser) context menu is displayed.
 For example, this gives access to the Unicode options available on some Windows systems ("Read from right to left, Show Unicode control characters, ..."). |
Remarks Adding menu options into the context menu The ContextMenu property cannot be used to cumulate the custom context menus associated with a control. However, it is possible to add menu options to an existing context menu using the MenuAddMenu, MenuAddOption, ... functions. For more details, see Menu functions. Context menu and group of controls You can associate a context menu with a group of fields: all the fields in the group will then have the same context 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 context menu, the persistent information previously saved for the Table control (size of columns, ...) is not available anymore. This information is reinitialized. Limitations The ContextMenu property applies only to controls in a window (including columns in Table controls). This property cannot be used with menus, etc. The ContextMenu property does not apply to the following controls: - Static
- Non-clickable image
- Progress Bar
- Shape
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|