ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Menu functions
  • Graying out a set of options
  • Miscellaneous
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
Disables (grays out) a menu option (context menu or drop-down menu). The specified menu option cannot be selected anymore. The option can be re-enabled through programming with MenuSelectPlus.
Example
// Grays out the "OPT_IconBar" option in 
// the drop-down menu ("Menu") of the current window
MenuSelectMinus(OPT_IconBar)

// Grays out the "OPT_IconBar" option in the "Menu" of the "WIN_Win1" window
// The WIN_Win1 window is not the current window
MenuSelectMinus(WIN_Win1, OPT_IconBar)

// Grays out the "OPT_IconBar" option in "ContextMenu1" 
MenuSelectMinus(WIN_Win1, ContextMenu1.OPT_IconBar)
Syntax
MenuSelectMinus([<Window>, ] <Menu option>)
<Window>: Optional window name
Name of the window containing the menu option to disable.
If this parameter is not specified, MenuSelectMinus will handle the current window.
<Menu option>: Option name
Name of the menu option to disable. This name is defined in the description window of the menu option.
This name must be specified without quotes.
If this parameter corresponds to the name of a menu, all the sub-options of this menu will also be disabled (recursive).
To gray out an option in a context menu, use the following notation: <Name of context menu>.<Option name>.
Remarks

Graying out a set of options

To gray out a set of options, you must:
  1. Assign the options to a group of controls
  2. Grey out the options (and the other controls in the group) with the State property.

Miscellaneous

When a menu option is not visible (Visible = False), it is displayed, but it is grayed out when MenuSelectMinus is called.
Component: wd300obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 09/20/2024

Send a report | Local help