PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
<Menu>.AddMenu (Function)
In french: <Menu>.AjouteMenu
AjaxNot available
Adds a new menu into a window or into a page. This menu can contain other menus, menu options, separators, ...
To insert a menu at a specific location, use <Menu>.InsertMenu.
Versions 16 and later
PHP This function is now available for PHP sites.
WINDEVLinux This function is now available for WINDEV applications in Linux.
New in version 16
PHP This function is now available for PHP sites.
WINDEVLinux This function is now available for WINDEV applications in Linux.
PHP This function is now available for PHP sites.
WINDEVLinux This function is now available for WINDEV applications in Linux.
Example
// Adds a new menu
MENU_MyMenu.AddMenu("OPT_Schedule", "Schedule")
// Adds an option into the new menu
OPT_Schedule.AddOption("OPT_Create", "Create", Create_Schedule)
// Associates an image with the menu option
{"OPT_Create", indControl}..Image = "schedule.png"
// Adds a separator
OPT_Schedule.AddSeparator()
// Adds a new option
OPT_Schedule.AddOption("OPT_View", "View", View_schedule)
Syntax

Adding a menu Hide the details

<Result> = <Source menu>.AddMenu(<Menu to create> , <Caption>)
<Result>: Integer
Position of the menu. A fatal error occurs if the menu was not added.
<Source menu>: Menu name
Name of the menu into which the new menu must be added. The new menu will be added at the end of this menu.
WEBDEV - Server codePHP This menu name must not correspond to a main menu.
<Menu to create>: Character string (with quotes)
Name of the menu that must be added. This name will be used to handle the menu by programming. A fatal error occurs if this name corresponds to an existing menu.
<Caption>: Character string (with quotes)
Caption of the new menu. The caption will be displayed in the window or in the page.
Component : wd250obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment