ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Control functions
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
OpenContextMenu (Function)
In french: OuvreMenuContextuel
AjaxNot available
Warning
From version 28, OpenPopupMenu is kept for backward compatibility. This function is replaced by OpenContextMenu.
Automatically opens a context menu for the current control, window or page.
Example
// -- Click code of BTN_Action button
OpenContextMenu(MenuDateChoice)
Syntax
OpenContextMenu([<Context menu name> [, <X> , <Y >]])
<Context menu name>: Optional character string
Name of the context menu that must be opened for the current control.
If this parameter is not specified, the default context menu associated with the control is opened.
Android This parameter is not available. Only the context menu of the current control can be opened.
<X>: Integer (optional)
X-coordinate of the opening position of the context menu. This X-coordinate is expressed in pixels, in relation to the upper-left corner of the window. If <X> and <Y> are not specified, the context menu is opened at mouse position.
AndroidiPhone/iPad This parameter is not available:
  • On iPhone, the context menu opens according to the iPhone standard: the context menu appears from the bottom of the screen.
  • On iPad, the context menu opens according to the iPad standard: the context menu appears next to the control that opened it.
  • In Android, the context menu opens in the middle of the screen.
<Y >: Integer (optional)
Y-coordinate of the opening position of the context menu. This Y-coordinate is specified in pixels, in relation to the upper-left corner of the window. If <X> and <Y> are not specified, the context menu is opened at mouse position.
AndroidiPhone/iPad This parameter is not available:
  • On iPhone, the context menu opens according to the iPhone standard: the context menu appears from the bottom of the screen.
  • On iPad, the context menu opens according to the iPad standard: the context menu appears next to the control that opened it.
  • In Android, the context menu opens in the middle of the screen.
Remarks
  • This function must be executed the code of a control, window or page.
    This function should not be used in the code for resizing a window.
  • This function is a blocking function until the context menu is closed.
    iPhone/iPad This function is not a locking function in iOS. WEBDEV - Browser code This function is not locking.
  • WINDEV For a MDI child window, it may be interesting to open a context menu defined in the MDI parent window. In this case, <Context menu name> must have the following format:
    NameOfWindow.NameOfContextMenu
  • Android This function must be used in one of the processes of the control for which the context menu is to be displayed.
Business / UI classification: UI Code
Component: wd290obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 03/14/2023

Send a report | Local help