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
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.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Example
// Inserts a new menu
MenuInsertMenu(_Menu, "MNU_Schedule", "MNU_Monitoring", "Project monitoring")
// Adds 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(<Name of Initial Menu> , <Name of Insertion Menu> , <Name of Menu to Create> , <Caption of Menu to Create>)
<Result>: Integer
  • Position of the menu in the sub-menu,
  • -1 if an error occurred.
<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 specified position.
<Name of Insertion Menu>: Character string (with or without quotes)
Name of the menu used as base position for the insertion. The new menu will be inserted before this position.
<Name of Menu to Create>: Character string (with quotes)
Name of the menu to create and to insert. 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 window.

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

<Result> = MenuInsertMenu(<Name of Initial Menu> , <Insertion Subscript> , <Name of Menu to Create> , <Caption of Menu to Create>)
<Result>: Integer
  • Position of the menu in the sub-menu,
  • -1 if an error occurred.
<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 specified position.
<Insertion Subscript>: Integer
Subscript of the menu used as base position for the insertion. The new menu will be inserted before this position.
<Name of Menu to Create>: Character string (with quotes)
Name of the menu to create and to insert. 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 window.
Components
WINDEVReports and Queries wd230obj.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