Home | Sign in | English US
  • Belonging of controls
  • WLanguage error
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WindowsLinuxPHPWEBDEV - Browser code
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Stored procedures
Returns the name of Nth control found in the specified element. This element must be displayed.
Note: In most cases, we recommend that you use gpwEnumControl that lists all controls directly.
WEBDEV - Server code The specified element can be a page, a report, a group of controls, a looper, a looper break, a cell or a supercontrol.
In a loop, this function is used to enumerate the controls found in an element.
WEBDEV - Server codeAjax
// Name of control 7 in the "PAGE_MyPage" page
ResControl = EnumControl(PAGE_MyPage, 7)
WEBDEV - Server codeAjax
// Fill a combo box with the list of page controls
i is int = 1
ResControl is string
ResControl = EnumControl(PAGE_MyPage, i)
WHILE ResControl <> ""
ListAdd(LIST_ControlList, ResControl)
ResControl = EnumControl(PAGE_MyPage, i)
<Result> = EnumControl(<"Parent" Object> , <Control Number>)
<Result>: Character string
  • Name of control found,
  • Empty string ("") if no control was found.
<"Parent" Object>: Character string
Name of "parent" object (containing the control). This parameter corresponds to the name of a window, looper, looper break, group, tab, supercontrol or report.
If the "parent" object is a tab, the following notation must be used: <Tab Name>[<Pane Number>]. For example: Tab1[2].
WEBDEV - Server code Name of "parent" object (containing the control). This parameter corresponds to the name of a page, report, group of controls, looper, looper break, cell or supercontrol.
<Control Number>: Integer
Number of the control whose name is requested. Each control is associated with a number. This number corresponds to:
  • the creation order of the controls (by default) if the type of enumeration is performed by the byCreationOrder constant
  • the tab order (which means the order in which the controls take focus in the "parent" object) if the type of enumeration is performed with the byTabOrder constant.
    The F5 key is used to see the navigation order in the window editor and in the page editor

Belonging of controls

Only the controls that directly belong to the specified "parent" object are enumerated.
For example, if <"Parent" object> corresponds to the name of a window (or page), EnumControl only works for the controls that directly belong to this window (or to this page). EnumControl cannot be used to retrieve the names of the controls belonging to the tabs or to the supercontrols of this window (or page).

WLanguage error

A WLanguage error occurs if:
  • <Control Number> is negative.
  • <Control Number> is greater than the number of controls found in <"Parent" Object> +1. This is used to avoid the endless loops.
  • <"Parent" Object> is not a window, a page, a report, a group, a tab or a supercontrol.
Component : wd240vm.dll
Minimum required version
  • Version 9
This page is also available for…
gpwEnumControl (Function)

Mesmo não tendo o uso do gwplogin ou a instalação do groupware esse comando é independente e funciona melhor.
May 14 2019