PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Enumerating the panes found in the tabs (or in the ribbons)
  • Enumerating the panes found in a sidebar
  • Limit
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
EnumSubElement (Function)
In french: EnumèreSousElément
Allows you to enumerate the sub-elements 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.
Remark: This function cannot be used on the reports or on the queries.
Reports and QueriesUser code (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
Reports and QueriesUser code (UMC)
// Parcours des volets d'un champ onglet
NomChamp is string = EnumSubElement("FEN_Fenêtre1.Onglet1", enumFirst + enumPane)
 
// Parcours de tous les volets
WHILE NomChamp <> ""
// Passage au volet suivant
Trace(NomChamp)
NomChamp = EnumSubElement("FEN_Fenêtre1.Onglet1", enumPane)
END
Ajax
// É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
Reports and QueriesUser code (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 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
Syntax
<Result> = EnumSubElement(<Element> [, <Option>])
<Result>: Character string
  • Full name of element found (<Window/Page Name>.<Control Name> for example),
  • Empty string ("") if no element was found.
<Element>: Character string (with quotes)
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.
enumSideBarEnumerates the panes found in a sidebar.
enumGroupEnumerates the groups found in a window or in a page
enumContextualMenuEnumerates the popup menus found in a window.
enumMainMenuEnumerates the drop-down menus found in a window. You can also use EnumMenu.
enumFirstInitializes the enumeration
enumPaneEnumerates the panes found in the tabs or ribbons.

Caution: the following combinations must be used to initialize the browse:
  • enumFirst to enumerate the controls found in a window or in a page
  • enumFirst + enumGroup to enumerate the groups found in a window or in a page
  • enumFirst + enumPane to enumerate the panes found in a tab or in a ribbon
  • enumFirst + enumContextualMenu to enumerate the popup menus
  • enumFirst + enumSideBar to enumerate the panes found in a sidebar
  • enumFirst + enumMainMenu to enumerate the main menus of a window or page
Remarks
Reports and QueriesUser code (UMC)

Enumerating the panes found in the tabs (or in the ribbons)

By Default, the EnumSubElement function used on a tab lists all the fields of all the panes without displaying the pane.
By specifying the constant enumPane, the function EnumSubElement used on a tab lists all the tabs (but not the fields contained in the tabs). The result has the following format: "<n>" where <n> is the tab number. To get the tab label, use the Property Libellé.
To enumerate the controls found in each pane, an enumeration must be performed on the pane from its number:
EnumèreSousElement("<fenêtre>.<onglet>.<n>")
Remark: Occurrence is used to find out the number of tab panes.
Reports and QueriesUser code (UMC)

Enumerating the panes found in a sidebar

By Default, the EnumSubElement function used on a toolbox lists all the fields in all the panes without showing the pane.
By specifying the constant enumSideBar, the function EnumSubElement used on a toolbox lists all the panes (but not the fields contained in the panes). The result has the following format: "<n>.<caption>" where <n> is the number of the pane and <caption> its caption.
To enumerate the controls found in each pane, an enumeration must be performed on the pane from its number:
EnumèreSousElement("<Fenêtre/Page>.<Boîte à outils>.<n>")

Limit

This function cannot be used to enumerate the sub-elements of an element found in a component.
Business / UI classification: Neutral code
Component: wd260gpu.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment