|
|
|
|
|
- Overview of the Looper control
- Creating a Looper control
- Creating a horizontal Looper control
- Attributes of a Looper control
- Attributes of a Looper control in WEBDEV
- Attributes of a Looper control in WINDEV or WINDEV Mobile
- Vocabulary
- Notes
- Swapping a Table control and a Looper control
- Refactoring: create a RepeatString Looper control from selected fields
Overview of the Looper control A Looper control is used to repeat controls in a specific area. Looper controls are "containers" that can hold and repeat controls a given number of times (Edit controls, Static Text controls, Combo Box controls, etc.).
The Looper control allows displaying and entering data more easily. Compared to the Table control, the Looper control presents richer interfaces as all types of controls can be repeated. The information displayed in the Looper control can: - control RepeatString by programming.
- come from a data file or a query: this is referred to as control RepeatString.
- come from an Variable WLanguage: this is referred to as an Looper control on Variable.
Remarks: - According to the platforms, the Looper controls can be displayed:
- vertically (by default on all the platforms).
- horizontally.
In WEBDEV, this type of control corresponds to the Linear Looper controls.
 The "Pull to refresh" feature is available for Looper controls in Android and iOS. For more details, see Pull to Refresh on Table and Looper controls (Android/iOS).  Most smartphones or tablets show a "Next" button to allow the user to go to the next element. In the case of an Edit control within an Looper control, this key cannot be used to go to the next row, or to enable cascading input. You must create a specific interface for this type of input.
Creating a Looper control Attributes of a Looper control To easily handle a Looper control, you must be familiar with the following vocabulary: | | Name | Definition |
---|
Attribute | An attribute is the association between the control in the looper and the property of this control that will be modified on each row. For each attribute, you must define:- the attribute name.
- the name of the control in the looper.
- the property of the control that will be modified on each row (value, color, etc.).
| Looper based on a data file | The Looper control is based on a data file or on a query. A record from the data file is displayed on each row. Two types of Looper controls based on a data file are available:- RepeatString file "Loaded into memory ": The content of control is loaded into memory and displayed.. The access to the different control elements is faster. This mode is reserved for data files with less than 100,000 records.
- RepeatString file "Direct access (unlimited) ": Looper control directly displays of the data file or query content. The current record corresponds to the selected element. Selecting an element in the control triggers an access to the linked data file. This mode is reserved for data files with more than 100 000 records.
| Looper populated programmatically | The Looper control is not based on a data file or on a query. The elements displayed in the control are defined by the developer (through programming). | Looper based on a variable | The Looper control is based on a variable (global to the project, window, page, class member, etc.). |
Swapping a Table control and a Looper control WINDEV, WINDEV Mobile and WEBDEV allow you to automatically transform a Table control into a Looper control: - Select the Table control to transform.
- On the "Modificación" tab, in the "Transformaciones" group, expand "Refactorización y permutaciones" and select "Table to Looper".
Refactoring: create a RepeatString Looper control from selected fields WINDEV, WINDEV Mobile and WEBDEV allow you to automatically create a Looper control from the controls currently selected: - Select the desired controls.
- On the "Modificación" tab, in the "Transformaciones" group, expand "Refactorización y permutaciones" and select "Create a looper from the selection".
Esta página también está disponible para…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|