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
MenuInsertOption (Function)
In French: MenuInsèreOption
Inserts a new option at a specific position. This menu option runs a procedure passed in parameter.
To add a menu option at the end of a menu, use MenuAddOption.
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 an option into the new menu
MenuInsertOption("MNU_Schedule", "MNU_Consult", "MNU_Create", "Create", Create_Schedule)
// Associates an image with the menu option
{"MNU_Create", indControl}..Image = "See.png"
Syntax

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

<Result> = MenuInsertOption(<Name of Initial Menu> , <Name of Insertion Option> , <Name of Option to Create> , <Caption of Option to Create> , <Procedure Name> [, <Procedure Parameter>])
<Result>: Integer
Position of the option in the menu. A fatal error occurs if the menu option was not inserted.
<Name of Initial Menu>: Character string (with or without quotes)
Name of the menu where the menu option must be created and added. The menu option will be added at the end of this menu.
<Name of Insertion Option>: Character string (with or without quotes)
Name of the menu option used as base position for the insertion. The new menu option will be inserted before this position.
<Name of Option to Create>: Character string (with quotes)
Name of the menu option to create and to insert. This name will be used to handle the menu option by programming. A fatal error occurs if this name corresponds to an existing option.
<Caption of Option to Create>: Character string (with quotes)
Caption of the new menu option. This caption will be displayed in the window and it will allow the user to select the option.
<Procedure Name>: Character string (with or without quotes)
WLanguage procedure called when the menu option is selected.
<Procedure Parameter>: Optional variant
Parameter that can be passed to <Procedure Name> when the menu option is selected by the user.

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

<Result> = MenuInsertOption(<Name of Initial Menu> , <Subscript of Insertion Option> , <Name of Option to Create> , <Caption of Option to Create> , <Procedure Name> [, <Procedure Parameter>])
<Result>: Integer
Position of the option in the menu. A fatal error occurs if the menu option was not inserted.
<Name of Initial Menu>: Character string (with or without quotes)
Name of the menu where the menu option must be created and inserted. The menu option will be added at the end of this menu.
<Subscript of Insertion Option>: Character string (with or without quotes)
Subscript of the menu option used as base position for the insertion. The new menu option will be inserted before this position.
<Name of Option to Create>: Character string (with quotes)
Name of the menu option to create and to insert. This name will be used to handle the menu option by programming. A fatal error occurs if this name corresponds to an existing option.
<Caption of Option to Create>: Character string (with quotes)
Caption of the new menu option. This caption will be displayed in the window and it will allow the user to select the option.
<Procedure Name>: Character string (with or without quotes)
WLanguage procedure called when the menu option is selected.
<Procedure Parameter>: Optional variant
Parameter that can be passed to <Procedure Name> when the menu option is selected by the user.
Remarks
To associate an image with a menu option, use ..Image.
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