ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Menu functions
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
MenuInsertMenu (Function)
In french: MenuInsèreMenu
Inserts a menu before another menu in a window. The inserted menu can contain other menus, menu options, separators, ...
To add a menu at the end of an existing menu, use MenuAddMenu.
Example
// Insert a new menu
MenuInsertMenu(_Menu, "MNU_Schedule", "MNU_Monitoring", "Project monitoring")
// Add an option into the new menu
MenuAddOption("MNU_Monitoring", "MNU_Prj", "Sales management", Sales_Mgt)
Syntax

Inserting a menu (position defined by a menu name) Hide the details

<Result> = MenuInsertMenu(<Source menu> , <Insert menu> , <Menu to create> , <Caption>)
<Result>: Integer
  • Position of the menu in the sub-menu,
  • -1 if an error occurred.
<Source menu>: Menu name
Name of the menu to which the new menu should be added. The new menu will be added at the specified position.
<Insert menu>: Menu name
Name of the menu used as base position for the insertion. The new menu will be inserted before this position.
<Menu to create>: Character string
Name of the menu to create and to insert. This name will be used to programmatically handle the menu. A fatal error occurs if this name corresponds to an existing menu.
<Caption>: Character string
Text of the new menu. This caption will be displayed in the window.

Inserting a menu (position defined by a menu subscript) Hide the details

<Result> = MenuInsertMenu(<Source menu> , <Insertion index> , <Menu to create> , <Caption>)
<Result>: Integer
  • Position of the menu in the sub-menu,
  • -1 if an error occurred.
<Source menu>: Menu name
Name of the menu to which the new menu should be added. The new menu will be added at the specified position.
<Insertion index>: Integer
Subscript of the menu used as base position for the insertion. The new menu will be inserted before this position.
<Menu to create>: Character string
Name of the menu to create and to insert. This name will be used to programmatically handle the menu. A fatal error occurs if this name corresponds to an existing menu.
<Caption>: Character string
Text of the new menu. This caption will be displayed in the window.
Component: wd290obj.dll
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 04/06/2023

Send a report | Local help