AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Funciones estándar / Funciones de Windows / Funciones de proyectos
  • Enumerating the panes in a Tab or Ribbon control
  • Enumerating the panes of a Sidebar control
  • Limit
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
EnumSubElement (Function)
Enumerates the subelements of a project element. This function can be run even if the element is not opened.
In a loop, this function can be used to enumerate the controls found in a window (or in a page) of a project.
Note: This function cannot be used on reports or queries.
WINDEVReportes y ConsultasCódigo de Usuario (UMC)
// Énumération des champs d'une fenêtre d'un projet
NomChamp is string = EnumSubElement("MaFenêtre", enumFirst)
// Parcours tous les champs
WHILE NomChamp <> ""
	Trace(NomChamp)
	// Passage au champ suivant
	NomChamp = EnumSubElement("MaFenêtre")
END
WINDEVReportes y ConsultasCódigo de Usuario (UMC)
// Parcours des volets d'un champ Onglet
NomChamp is string = EnumSubElement("FEN_Fenêtre1.Onglet1", enumFirst + enumPane)

// Parcours de tous les volets du champ Onglet
WHILE NomChamp <> ""
	// Passage au volet suivant
	Trace(NomChamp)
	NomChamp = EnumSubElement("FEN_Fenêtre1.Onglet1", enumPane)
END
WEBDEV - Código ServidorAjax
// Énumération des champs d'une page d'un projet
NomChamp is string = EnumSubElement("MaPage", enumFirst)
// Parcours tous les champs
WHILE NomChamp <> ""
	Trace(NomChamp)
	// Passage au champ suivant
	NomChamp = EnumSubElement("MaPage")
END
WINDEVReportes y ConsultasCódigo de Usuario (UMC)
// Parcours des champs d'une fenêtre et affichage de leur type et libellé.
sParent is string = "FEN_SAISIE_CLIENT"
sNomChamp is string = EnumSubElement(sParent, enumFirst)
WHILE sNomChamp <> ""

	// Nom complet du champ
	sNomComplet is string = sParent + "." + sNomChamp
	// Récupération du type de l'élément
	nType is int = {sNomComplet, indGPW}..Type

	// Si c'est un groupe de champs ou un champ Onglet
	IF nType = typTab OR nType = typTable OR nType = typToolbar OR ...
		nType = typToolbox OR nType = typSuperControl THEN
		// Enumération des champs qui sont à l'intérieur
		Trace(sNomComplet)
	ELSE
		// Ne fait rien si c'est une option de menu
		IF nType <> typMenuOption THEN
			// Ajout de l'élément dans la trace
			Trace(sNomComplet, nType, {sNomComplet, indGPW}..Caption, ...
				{sNomComplet, indGPW}..Group)
		END
	END

	// Champ suivant
	sNomChamp = EnumSubElement(sParent)
END
Sintaxis
<Result> = EnumSubElement(<Element> [, <Option>])
<Result>: Character string
  • Full name of the element found (<Window/Page name>.<Control name> for example),
  • Empty string ("") if no element was found.
<Element>: Character string
Full name of element to enumerate. For a control, this parameter has the following format: <Window/Page name>.<Control name> ("MyWindow.MyTable" for example).
<Option>: Optional constant
Parameter that must be specified during the first call to the function (to start the enumeration). This parameter is not required to continue the enumeration.
enumContextMenuEnumerates the context menus found in a window.
WEBDEV - Código Servidor This constant is not available.
enumFirstStarts the enumeration
enumGroupEnumerates the groups found in a window or in a page
enumMainMenuEnumerates the drop-down menus found in a window. You can also use EnumMenu.
WEBDEV - Código Servidor This constant is not available.
enumPaneEnumerates the tabs in a Tab or Ribbon control.
WEBDEV - Código Servidor This constant is not available.
enumSideBarEnumerates the panes found in a sidebar.
WEBDEV - Código Servidor This constant is not available.

Please note: the following combinations must be used to initialize the route:
  • enumFirst to enumerate the controls found in a window or in a page.
  • enumFirst + enumGroup to enumerate the groups in a window or page.
  • enumFirst + enumPane to enumerate the panes in a Tab or Ribbon control.
  • enumFirst + enumContextMenu to enumerate context menus.
  • enumFirst + enumSideBar to enumerate the tabs in a Sidebar control.
  • enumFirst + enumMainMenu to enumerate the main menus of a window or page.
Observaciones
WINDEVReportes y ConsultasCódigo de Usuario (UMC)

Enumerating the panes in a Tab or Ribbon control

By default, when EnumSubElement is used on a Tab control, all the controls of all the panes are enumerated without displaying each pane.
If the enumPane constant is used, EnumSubElement enumerates the tab panes (but not the controls contained in those panes). The result is of type "<n>", where <n> is the number of the tab pane. To get the text of the tab, use the Caption property.
To enumerate the controls of each tab pane, run an enumeration on the pane, specifying its number:
EnumèreSousElement("<fenêtre>.<onglet>.<n>")
Note: The Count property is used to identify the number of panes in a Tab Control.
Example:
// Parcours des volets d'un champ Onglet
NomChamp is string = EnumSubElement("FEN_Menu.Ong_Visualisation", ...
			enumFirst + enumPane)

// Parcours de tous les volets d'onglet
WHILE NomChamp <> ""
	// Passage au volet suivant
	Trace(NomChamp)
	Trace(ONG_Visualisation[NomChamp].Libellé)
	// Parcours des champs du volet
	NomChamp2 is string = 
	NomChamp2 = EnumSubElement("FEN_Menu.Ong_Visualisation." + NomChamp, enumFirst)
	WHILE NomChamp2 <> ""
		Trace(NomChamp2)
		NomChamp2 = EnumSubElement("FEN_Menu.Ong_Visualisation." + NomChamp)
	END
	NomChamp = EnumSubElement("FEN_Menu.Ong_Visualisation", enumPane)
END
WINDEVReportes y ConsultasCódigo de Usuario (UMC)

Enumerating the panes of a Sidebar control

By default, when EnumSubElement is used on a Sidebar control, all the controls of all the panes are enumerated without displaying each pane.
When the enumSideBar constant is used, EnumSubElement enumerates all the tabs of the Sidebar control (but not the controls in the tabs). The result is of type "<n>.<caption>", where <n> is the number of the pane and <caption> is its caption.
To enumerate the controls of each tab in the Sidebar control, run an enumeration on the tab, specifying its number:
EnumèreSousElement("<Fenêtre/Page>.<Boîte à outils>.<n>")

Limit

This function cannot be used to enumerate the subelements of an element found in a component.
Clasificación Lógica de negocio / UI: Código neutro
Componente: wd300gpu.dll
Ver también
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 25/03/2025

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