- Belonging of controls
- Using retrieved controls
- Tab controls with dynamic panes
- WLanguage error
EnumControl (Function) In french: EnumèreChamp Syntax
<Result> = EnumControl(<"Parent" object> , <Control number> [, <Type of enumeration>])
<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, a Looper control, a break in a Looper control, a group, a Tab control, a supercontrol o a report.If the "parent" object is a Tab control, the following syntax must be used: <Name of Tab control>[<Number of tab pane>]. For example: TAB_Tab1[2]. <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
<Type of enumeration>: Optional Integer constant Order in which the enumeration is performed:
| | byZOrder | Enumeration performed according to the z-order position of controls, from the lowest one to the highest one. | byCreationOrder (Default value) | Enumeration performed according to the creation order of controls (in the editor or by ControlClone). | byTabOrder | Enumeration performed according to the navigation order with the tab key (Tab). The controls that are not accessible with the tab key (Tab) are listed at the end. |
Remarks 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 Tab controls or the supercontrols of this window (or page).
// Name of control 7 in the page ControlName is string = EnumControl(MyPage, 7) // Control caption ToastDisplay({ControlName}..Caption)
Versions 20 and later New in version 20A 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 control or a supercontrol.
This page is also available for…
|
|
|