AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones de ventanas
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
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 context 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.
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 the 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
  • Name of the window containing the menus to list. This window must be opened when using this function.
  • Name of the menu that contains the options to 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.
Component: wd290obj.dll
Versión mínima requerida
  • Versión 9
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 26/05/2022

Señalar un error o enviar una sugerencia | Ayuda local