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
EnumMenu (Function)
In French: EnumèreMenu
Returns:
  • the name of nth option or sub-option found in the main menu of window.
  • the name of nth option or sub-option found in a custom popup menu (created with WINDEV or WINDEV Mobile).
In a loop, this function is used to enumerate the menu options of a window as well as the sub-options of a menu option.
Versions 15 and later
Java This function is now available for the Java applications.
Android This function is now available for the Android applications.
New in version 15
Java This function is now available for the Java applications.
Android This function is now available for the Android applications.
Java This function is now available for the Java applications.
Android This function is now available for the Android applications.
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.
Versions 20 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function can only be used to enumerate the options of a popup menu.
New in version 20
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function can only be used to enumerate the options of a popup menu.
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function can only be used to enumerate the options of a popup menu.
Example
i is int = 1
MenuName is string
MenuName = EnumMenu(MyWindow, 1) // Read the 1st menu of the window
WHILE MenuName <> ""
Trace(MenuName)
j is int = 1
NameSubMenu is string
NameSubMenu = EnumMenu(MenuName, j) // Read the 1st option of the menu
WHILE NameSubMenu <>""
Trace(" " + NameSubMenu)
j++ // Next option
NameSubMenu = EnumMenu(MenuName, j)
END
i++ // Next menu
MenuName = EnumMenu(MyWindow, i)
END
Syntax
<Result> = EnumMenu(<Parent Object> , <Option Number>)
<Result>: Character string
  • Name of option,
  • Empty string ("") if <Parent Object> corresponds to a menu option or if the enumeration is over.
The option name was defined in the window editor when creating the menu.
<Parent Object>: Character string (with or without quotes)
  • Name of the window containing the menus to list. This window must be opened when using this function.
  • Name of menu whose options will be listed.
<Option Number>: Integer
Number of the option whose name is requested.
Remarks
A WLanguage error is displayed in the following cases:
  • <Option Number> is a negative integer.
  • <Option Number> is greater than the number of menu options + 1.
  • <Parent Object> is not a window, a menu or a menu option.
  • <Parent Object> is a window that is not opened. To list a menu found in a window that is not opened, use EnumSubElement.
Components
WINDEVReports and Queries wd230obj.dll
Windows Mobile wp230obj.dll
Java wd230java.jar
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment