PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
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
MenuAddMenu (Function)
In French: MenuAjouteMenu
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 MenuInsertMenu.
Versions 16 and later
PHP This function is now available for the PHP sites.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
PHP This function is now available for the PHP sites.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
PHP This function is now available for the PHP sites.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Example
// Adds a new menu
MenuAddMenu(MENU_MyMenu, "OPT_Schedule", "Schedule")
// Adds an option into the new menu
MenuAddOption("OPT_Schedule", "OPT_Create", "Create", Create_Schedule)
// Associates an image with the menu option
{"OPT_Create", indControl}..Image = "schedule.png"
// Adds a separator
MenuAddSeparator("OPT_Schedule")
// Adds a new option
MenuAddOption("OPT_Schedule", "OPT_View", "View", View_schedule)
Syntax

Adding a menu Hide the details

<Result> = MenuAddMenu(<Name of Initial Menu> , <Name of Menu to Create> , <Caption of Menu to Create>)
<Result>: Integer
Position of the menu. A fatal error occurs if the menu was not added.
<Name of Initial Menu>: Character string (with or without quotes)
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.
<Name of 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 of Menu to Create>: Character string (with quotes)
Caption of the new menu. The caption will be displayed in the window or in the page.
Versions 18 and later
Caution: Syntax available from version 180046
WEBDEV - Server codePHP

Adding a menu while associating it with WLanguage code Hide the details

<Result> = MenuAddMenu(<Name of Initial Menu> , <Name of Menu to Create> , <Caption of Menu to Create> , <Procedure Name> [, <Procedure Parameter>])
<Result>: Integer
Position of the menu. A fatal error occurs if the menu was not added.
<Name of Initial Menu>: Character string (with or without quotes)
Name of the menu into which the new menu must be added. The new menu will be added at the end of this menu. This menu name must not correspond to a main menu.
<Name of 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 of Menu to Create>: Character string (with quotes)
Caption of the new menu. This caption will be displayed in the page.
<Procedure Name>: Character string (with or without quotes)
WLanguage procedure called when the menu is selected.
<Procedure Parameter>: Any optional type
Parameter that can be passed to <Procedure Name> when the menu is selected by the user.
New in version 18
Caution: Syntax available from version 180046
WEBDEV - Server codePHP

Adding a menu while associating it with WLanguage code Hide the details

<Result> = MenuAddMenu(<Name of Initial Menu> , <Name of Menu to Create> , <Caption of Menu to Create> , <Procedure Name> [, <Procedure Parameter>])
<Result>: Integer
Position of the menu. A fatal error occurs if the menu was not added.
<Name of Initial Menu>: Character string (with or without quotes)
Name of the menu into which the new menu must be added. The new menu will be added at the end of this menu. This menu name must not correspond to a main menu.
<Name of 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 of Menu to Create>: Character string (with quotes)
Caption of the new menu. This caption will be displayed in the page.
<Procedure Name>: Character string (with or without quotes)
WLanguage procedure called when the menu is selected.
<Procedure Parameter>: Any optional type
Parameter that can be passed to <Procedure Name> when the menu is selected by the user.
Caution: Syntax available from version 180046
WEBDEV - Server codePHP

Adding a menu while associating it with WLanguage code Hide the details

<Result> = MenuAddMenu(<Name of Initial Menu> , <Name of Menu to Create> , <Caption of Menu to Create> , <Procedure Name> [, <Procedure Parameter>])
<Result>: Integer
Position of the menu. A fatal error occurs if the menu was not added.
<Name of Initial Menu>: Character string (with or without quotes)
Name of the menu into which the new menu must be added. The new menu will be added at the end of this menu. This menu name must not correspond to a main menu.
<Name of 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 of Menu to Create>: Character string (with quotes)
Caption of the new menu. This caption will be displayed in the page.
<Procedure Name>: Character string (with or without quotes)
WLanguage procedure called when the menu is selected.
<Procedure Parameter>: Any optional type
Parameter that can be passed to <Procedure Name> when the menu is selected by the user.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
Java wd230java.jar
Linux wd230obj.so
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment