ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / User Groupware functions
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
Warning
From version 25, this function is kept for backward compatibility. It is recommended to use EnumControl, which offers more possibilities..
Enumerates the controls found in a window or page.
Remarks:
  • This function is used by the user groupware to enumerate the controls whose status (invisible, grayed, inactive) can be modified by the user groupware.
  • This function can be used even if the User Groupware is not enabled in the project.
Example
PROCÉDURE EnumChildControl(sParentName is string)
 
// Browse the controls
nIndex is int = 1
sNameChildControl is string
sControlInfo is string = gpwEnumControl(sParentName, nIndex)
WHILE sControlInfo <> ""
Trace(sControlInfo)
// Retrieve the full name of the child control
sNameChildControl = ExtractString(sControlInfo, 1, TAB)
Trace(sNameChildControl)
// Next control
nIndex++
sControlInfo = gpwEnumControl(sParentName, nIndex)
END
Syntax
<Result> = gpwEnumControl(<Parent element> , <Index>)
<Result>: Character string
  • Characteristics of control found. These characteristics have the following format:
    <Full control name> + TAB + <Full parent name> + TAB + ...
    <Type> + TAB + <Plain type> + TAB + <Caption>

    where:
    • <Full control name>: Full name of the control found.
    • <Full parent name>: Full name of control parent (empty string for a window).
    • <Type>: identifier of control type (Type).
    • <Plain type>: Readable control type (for example, "Button", "Scrollbar", ...).
    • <Caption>: Control caption.
  • "" (empty string) if the enumeration is ended.
<Parent element>: Character string
Name of the "parent" object (containing the control). This parameter corresponds to the name of a window or page.
<Index>: Integer
Index of the control to enumerate. Each control is associated with a number. This number corresponds to the order in which the controls have been created.
Component: wd290gpu.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Exemplo Pcsoft
Exemplo de uso do EnumControl
Lista objetos da tela
Inclusive os sub objetos

j is int = 1
ResChamp is string
ResChamp = EnumControl(MyWindow.Name, j)
WHILE ResChamp <> ""
j++
Trace(ResChamp)
listeélément(MyWindow.Name+"."+ResChamp)
ResChamp = EnumControl(MyWindow.Name, j)
END


INTERNAL PROCÉDURE listeélément(NomElt)
i is int = 1
sResChampSousElt is string
sResChampSousElt = EnumSubElement(NomElt, i)
WHILE sResChampSousElt <> ""
i++
Trace(NomElt+"."+sResChampSousElt)
listeélément(NomElt+"."+sResChampSousElt)
sResChampSousElt = EnumSubElement(NomElt, i)
END
END


The Free Technical Support is entirely at your service.
Boller
14 Dec. 2023
LINK COM EXEMPLO
https://repository.windev.com/resource.awp?file_id=281474976711893;nospace-noaccent-upper-uppercapitalize-lower-para-todos-campos-formulario
Boller
30 Nov. 2023
LINK
https://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/3318-new-capitalize/read.awp
Boller
30 Nov. 2023
PROCEDURE evento_lista_objetos_gpw(ninstancia)
i is int = 1
objs_form is string = ""
sControlName is string = ""
ninstancia = ninstancia

<COMPILE IF Configuration<>"iOS application" AND Configuration<> "Android application">

arrayControles is array of string

IF ninstancia = 0 THEN

RESULT ""

ELSE

NomeForm is string = m_Tabela[ninstancia].gs_nomeJanela

WHEN EXCEPTION IN

sControlName = gpwEnumControl(NomeForm, i)
indirection is string = NoSpace(NomeForm) +"."+ NoSpace(sControlName)
Add(arrayControles,indirection)

LOOP(5000)

// Next control
i++

sControlName = gpwEnumControl(NomeForm, i)

IF sControlName <> ""
indirection = NoSpace(NomeForm) +"."+ NoSpace(sControlName)
Add(arrayControles,indirection)
Trace(indirection)
ELSE
BREAK
END

END

RESULT arrayControles

DO
IF ExceptionInfo(errCode) THEN
RESULT arrayControles
END
END

END

<END>
Boller
02 Sep. 2023

Last update: 09/05/2023

Send a report | Local help