PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 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
// Ajoute un nouveau menu
MenuAddMenu(MENU_MonMenu, "OPT_Planning", "Planning")
// Ajoute une option dans le nouveau menu
MenuAddOption("OPT_Planning", "OPT_Créer", "Créer", Créer_Planning)
// Associe une image à l'option de menu
{"OPT_Créer", indControl}..Image = "planning.png"
// Ajoute un séparateur
MenuAddSeparator("OPT_Planning")
// Ajoute une nouvelle option
MenuAddOption("OPT_Planning", "OPT_Voir", "Voir", Voir_planning)
Syntax

Adding a menu Hide the details

<Result> = MenuAddMenu(<Source menu> , <Menu to create> , <Libellé>)
<Result>: entier
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
Name of the menu that must be added. This name will be used to handle the menu through programming. A fatal error occurs if this name corresponds to an existing menu.
<Libellé>: Character string
Caption of the new menu. The caption will be displayed in the window or in the page.
Versions 18 and later
WEBDEV - Server codePHP

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

<Result> = MenuAddMenu(<Source menu> , <Menu to create> , <Libellé> , <WLanguage procedure> [, <Procedure parameter>])
<Result>: entier
Position of the menu. A fatal error occurs if the menu was not added.
<Source menu>: Control 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. This menu name must not correspond to a main menu.
<Menu to create>: Character string
Name of the menu that must be added. This name will be used to handle the menu through programming. A fatal error occurs if this name corresponds to an existing menu.
<Libellé>: Character string
Caption of the new menu. This caption will be displayed in the page.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure called when the menu is selected.
<Procedure parameter>: Any optional type
Parameter that can be passed to <WLanguage procedure> when the menu is selected by the user.
New in version 18
WEBDEV - Server codePHP

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

<Result> = MenuAddMenu(<Source menu> , <Menu to create> , <Libellé> , <WLanguage procedure> [, <Procedure parameter>])
<Result>: entier
Position of the menu. A fatal error occurs if the menu was not added.
<Source menu>: Control 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. This menu name must not correspond to a main menu.
<Menu to create>: Character string
Name of the menu that must be added. This name will be used to handle the menu through programming. A fatal error occurs if this name corresponds to an existing menu.
<Libellé>: Character string
Caption of the new menu. This caption will be displayed in the page.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure called when the menu is selected.
<Procedure parameter>: Any optional type
Parameter that can be passed to <WLanguage procedure> when the menu is selected by the user.
WEBDEV - Server codePHP

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

<Result> = MenuAddMenu(<Source menu> , <Menu to create> , <Libellé> , <WLanguage procedure> [, <Procedure parameter>])
<Result>: entier
Position of the menu. A fatal error occurs if the menu was not added.
<Source menu>: Control 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. This menu name must not correspond to a main menu.
<Menu to create>: Character string
Name of the menu that must be added. This name will be used to handle the menu through programming. A fatal error occurs if this name corresponds to an existing menu.
<Libellé>: Character string
Caption of the new menu. This caption will be displayed in the page.
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure called when the menu is selected.
<Procedure parameter>: Any optional type
Parameter that can be passed to <WLanguage procedure> when the menu is selected by the user.
Component: wd270obj.dll
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment