PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Principle
  • WLanguage functions
  • WLanguage properties
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
The menu options can be handled:
Versions 20 and later
iPhone/iPad The custom popup menus are now available for the iPhone/iPad applications.
New in version 20
iPhone/iPad The custom popup menus are now available for the iPhone/iPad applications.
iPhone/iPad The custom popup menus are now available for the iPhone/iPad applications.
Principle
The method for handling a menu option is identical for the popup menus and for the main menus.
To handle a menu option by programming, use the following notation:
  • "<OptionName>" if the option is handled from the window.
  • "<WindowName>.<MenuName>.<OptionName>" if the option is handled from another window.
Note: You also have the ability to handle the popup menus by programming (not only their options). See Custom popup menu for more details.

WLanguage functions

WINDEV and WINDEV Mobile propose several WLanguage functions specific to the menu options:
Versions 09 and later
EnumMenu
New in version 09
EnumMenu
EnumMenu
Returns:
  • the name of nth option or sub-option found in the main menu of window.
  • the name of nth option or sub-option found in a custom popup menu (created with WINDEV or WINDEV Mobile).
Versions 09 and later
MenuAdd
New in version 09
MenuAdd
MenuAdd
Adds an existing popup menu into the main menu of the current window.
Versions 14 and later
MenuAddMenu
New in version 14
MenuAddMenu
MenuAddMenu
Adds a new menu into a window or into a page.
Versions 14 and later
MenuAddOption
New in version 14
MenuAddOption
MenuAddOption
Adds a new menu option at the end of a menu.
Versions 14 and later
MenuAddSeparator
New in version 14
MenuAddSeparator
MenuAddSeparator
Adds a new separator into a menu.
Versions 14 and later
MenuClone
New in version 14
MenuClone
MenuClone
Clones a menu or a menu option as well as the associated code.
Versions 11 and later
MenuDelete
New in version 11
MenuDelete
MenuDelete
Deletes a menu or a menu option.
Versions 16 and later
MenuExist
New in version 16
MenuExist
MenuExist
Indicates whether a menu option exists in a menu
Versions 14 and later
MenuInsertMenu
New in version 14
MenuInsertMenu
MenuInsertMenu
Inserts a menu before another menu in a window.
Versions 14 and later
MenuInsertOption
New in version 14
MenuInsertOption
MenuInsertOption
Inserts a new option at a specific position.
Versions 14 and later
MenuInsertSeparator
New in version 14
MenuInsertSeparator
MenuInsertSeparator
Inserts a separator into a menu.
Versions 09 and later
MenuInvisible
New in version 09
MenuInvisible
MenuInvisible
Makes a menu option invisible (popup menu or drop-down menu).
Versions 09 and later
MenuIsMarked
New in version 09
MenuIsMarked
MenuIsMarked
Used to find out whether a checkmark is displayed in front of a menu option (popup menu or drop-down menu).
Versions 09 and later
MenuLabel
New in version 09
MenuLabel
MenuLabel
Identifies or modifies the caption of a menu option (popup menu or drop-down menu).
Versions 09 and later
MenuMark
New in version 09
MenuMark
MenuMark
Positions the checkmark in front of the menu option (popup menu or drop-down menu).
Versions 09 and later
MenuSelectMinus
New in version 09
MenuSelectMinus
MenuSelectMinus
Disables (grays) a menu option (popup menu or drop-down menu).
Versions 09 and later
MenuSelectPlus
New in version 09
MenuSelectPlus
MenuSelectPlus
Enables a menu option (popup menu or drop-down menu).
Versions 09 and later
MenuState
New in version 09
MenuState
MenuState
Identifies the status of a menu option (popup menu or drop-down menu): active, inactive or invisible.
Versions 09 and later
MenuUnMark
New in version 09
MenuUnMark
MenuUnMark
Removes the checkmark displayed in front of the menu option (popup menu or drop-down menu).

WLanguage properties

WINDEV and WINDEV Mobile propose several WLanguage properties specific to the menu options:
CheckedUsed to manage a checkmark in front of the menu option.
ReportUsed to find out and modify the display status (active, inactive or grayed) of a menu option
GroupUsed to find out whether the menu option belongs (or not) to a group of controls
ImageUsed to find out and modify the image of a menu option
CaptionUsed to find out and modify the caption of a menu option
MessageUsed to find out and modify the help message of a menu option
NameUsed to find out the name of a menu option
Versions 16 and later
Occurrence
New in version 16
Occurrence
Occurrence
Used to find out the number of options in a menu.
TypeAllows you to find out whether the element used is a menu option
ValueUsed to find out and modify the number associated with a menu option
VisibleUsed to find out whether a menu option is visible and to make a menu option visible/invisible
Related Examples:
Managing the main menu of a window by programming Unit examples (WINDEV): Managing the main menu of a window by programming
[ + ] Handling the options found in the main menu of a window. This example is used to:
- Select or deselect a menu option
- Make a menu option visible or invisible
- Modifying the caption of a menu option
- Mark or unmark a menu option
- Run the code of a menu option
WD Animated Menu Training (WINDEV): WD Animated Menu
[ + ] The "WD Animated Menu" example proposes several menu animations, based on the interface of the full example named "WD Managing Orders".
These animations allow the main menu to be more attractive and dynamic when opening the window:
- appearance of the menu buttons with a fade-in effect,
- movement of the buttons
- etc.
WD LastDocuments Sample components (WINDEV): WD LastDocuments
[ + ] This example explains how the list of last opened documents can be added to the application menu.
This insertion is performed via a class proposed in the "LastDocuments" component.
Four code lines are sufficient to insert the list of last opened documents into an existing application.
These processes can be found in:
- the declaration code of the global variables of the main window,
- the code of the OpenDocument procedure,
- the code of the menu options "File 1" to "File 10".
The example has been simplified regarding the number of features (text files only) in order to highlight the use of the component.
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment