ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Menu functions
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
MenuAdd (Function)
In french: MenuAjoute
Adds an existing context menu to the main menu of the current window.
Example
// Add the "MENU_ContextMenu1" menu into the menu option "OPT_File"
MenuAdd(OPT_File, MENU_ContextMenu1)

// Add the "MENU_ContextMenu2" menu into the main menu "_Menu"
MenuAdd(_Menu, MENU_ContextMenu2)
Syntax
MenuAdd(<Destination menu> , <Context menu> [, <Position>])
<Destination menu>: Menu name
Name of the menu option where the insertion must be performed.
If this parameter corresponds to a menu, the context menu is added to the options of this menu.
If this parameter corresponds to a menu option, this menu option will display the options of the context menu.
If this parameter corresponds to an empty string (""), the context menu is added to the main menu.
<Context menu>: Menu name
Name of the context menu that must be inserted.
<Position>: Optional integer
Position where the menu will be inserted.
If this parameter is not specified or if it is equal to -1, the context menu is added at the end.
If this parameter is equal to 1, the context menu is inserted at the beginning.
Remarks
If the window includes no main menu, this menu is created.
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