AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Propiedades WLanguage / Propiedades de ventanas, páginas y controles
  • 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
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Advertencia
A partir de la versión 28, PopupMenu se conserva por motivos de compatibilidad. Esta propiedad ha sido reemplazada por 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).
  • WINDEVAndroidiPhone/iPadIOS WidgetJava Customize the system menus of the controls by adding options.
Reminder: A context menu is a menu that can be opened by the user with a right mouse click.. You can create context menus directly in the window or page editor, in the UI tab of the control description window. The arrow on the right of the "Context menu" field allows you to edit or create a context menu in the editor. For more details, see:
WINDEVAndroidiPhone/iPadIOS WidgetJava Remark: Some field types (Edit control fields, tables, ...) have a default system menu (displayed if no custom context menu is associated with the field).. This system menu can also be disabled.
Ejemplo
WINDEV
// Code permettant de modifier le menu contextuel associé au bouton
// Popup1 et Popup2 sont des menus contextuels existants
IF BTN_Bouton1.MenuContextuel = "Popup1" THEN
	BTN_Bouton1.MenuContextuel = "Popup2"
ELSE
	// Remet le menu contextuel par défaut des FAA
	BTN_Bouton1.MenuContextuel = ""
END
WINDEVAndroidiPhone/iPad
// Code d'initialisation du champ de saisie
// Ajoute le menu Popup1 à la suite du menu contextuel système du champ
// Popup1 est un menu contextuel existant
MySelf.MenuContextuel = "+Popup1"
Sintaxis

Getting the context menu of a control, window or page Ocultar los detalles

<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 Ocultar los detalles

<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 new custom context menu associated with the object (empty string to restore the system context menu).
WINDEVAndroidiPhone/iPadIOS WidgetJava To add a context 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.
WINDEVAndroidiPhone/iPadIOS WidgetJava You also have the ability to use the following constants:
contextMenuDisabledUsed to disable the display of all the context menus (including the system context menus or the context menus for the Currency + Euro edit controls).
Android This constant is not available.
contextMenuSystemDisables the menu options specific to the AAFs (Automatic Application Features). Only the Windows context menu is displayed.
Also gives access to the Unicode options available on some Windows ("Read from right to left, Show Unicode control characters, ...").
Observaciones

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 ("").
WINDEVWindows

Horizontal Table control

The system context menu of the Horizontal Table controls does not contain the export options.

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
Java The ContextMenu property can only be used with the following elements:
  • Button.
  • Edit control.
  • Image.
  • Check Box.
  • Radio Button.
  • List Box.
  • Combo Box.
  • TreeView.
  • Tab.
  • Window.
  • Table Column control.
  • Supercontrol.
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 24/09/2024

Señalar un error o enviar una sugerencia | Ayuda local