PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
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
Enumerates the controls found in a window or page.
Notes:
  • 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.
Versions 19 and later
Windows This function is now available for the WEBDEV sites in Windows.
New in version 19
Windows This function is now available for the WEBDEV sites in Windows.
Windows This function is now available for the WEBDEV sites in Windows.
Example
PROCEDURE EnumChildControl(sParentName is string)
 
// Browse the controls
nSubscript is int = 1
sNameChildControl is string
sControlInfo is string = gpwEnumControl(sParentName, nSubscript)
WHILE sControlInfo <> ""
Trace(sControlInfo)
// Retrieve the full name of the child control
sNameChildControl = ExtractString(sControlInfo, 1, TAB)
Trace(sNameChildControl)
// Next control
nSubscript++
sControlInfo = gpwEnumControl(sParentName, nSubscript)
END
Syntax
<Result> = gpwEnumControl(<Parent element> , <Subscript>)
<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 (with or without quotes)
Name of "parent" object (containing the control). This parameter corresponds to the name of a window, page or report.
<Subscript>: Integer
Subscript of control to enumerate. Each control is associated with a number. This number corresponds to the order in which the controls have been created.
Component : wd240gpu.dll
Minimum version required
  • Version 18
This page is also available for…
Comments
Listagem dos itens da tela
Procedure Screen_03_CargaItens(Janela)
TableGrid_ControlItens.DeleteAll()
Itens is string = ""
nSubscript is int = 1
sControl0, sControl1, sControl2, sControl3, sControl4, sControl5, sControl6 is string
sParentName is string = Janela //"WIN_Form_tabela"
sControlInfo is string = gpwEnumControl(sParentName, nSubscript)
WHILE sControlInfo <> ""
sControl1 = ExtractString(sControlInfo, 1, TAB) //Full control name *
sControl2 = ExtractString(sControlInfo, 2, TAB) //Full parent name
sControl3 = ExtractString(sControlInfo, 3, TAB) //Type
sControl4 = ExtractString(sControlInfo, 4, TAB) //Plain type *
sControl5 = ExtractString(sControlInfo, 5, TAB) //caption *
sControl6 = ExtractString(sControlInfo, 6, TAB) //tab order
sControl0 = ExtractString(sControl1,1,".",FromEnd)
TableAdd(TableGrid_ControlItens,Janela+"."+sControl1 +TAB+ sControl0 +TAB+ sControl5 +TAB+ sControl4 + TAB+ "")
nSubscript++
sControlInfo = gpwEnumControl(sParentName, nSubscript)
Itens += sControl1 + CR
END
BOLLER
13 May 2019