AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / Desarrollar una aplicación o un sitio web / Controles, ventanas y páginas / Controles: tipos disponibles / Control Looper
  • 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
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
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.
  • AndroidiPhone/iPad 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).
  • AndroidiPhone/iPad 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
To create a Looper control:
  1. On the "Creación" tab, in the "Datos" group:
    • WINDEVWINDEV Mobile expand "Looper" and select "Looper (vertical)".
      WINDEVWindowsAndroidiPhone/iPad Note: A horizontal RepeatString zone can be created using the "Horizontal RepeatString zone" option..
    • WEBDEV - Código Servidor expand "Looper" and select "Looper".
      Note: It is possible to create a RepeatString Gallery zone using the "Line Gallery" and "Column Gallery" options..
  2. Click where the control will be created in the window or page. The Looper control creation wizard starts automatically.
Remarks:
  • WINDEV The dimensions of the control are optimized to take up the available space at the specified position. If the field size does not suit you, use the Ctrl + Z key combination: the field will return to its default size..
  • iPhone/iPad The iPhone and iPad window creation wizard can also be used to create preset Loopers. For more details, see Windows for iPhone and iPad.
To view the control characteristics, select "Description" in the context menu of the control.
For more details:
WINDEVWindowsAndroidiPhone/iPad

Creating a horizontal Looper control

You also have the ability to create horizontal Looper controls. In this case, the control will include a horizontal scrollbar used to scroll the different rows.
To create a horizontal Looper control:
  1. On the "Creación" tab, in the "Datos" group, expand "Looper" and select "Horizontal Looper".
  2. Click where the control will be created in the window or page. The Looper control creation wizard starts automatically.
To view the characteristics of the control, select "Description" in the context menu.
Attributes of a Looper control
WEBDEV - Código ServidorWEBDEV - Código NavegadorPHP

Attributes of a Looper control in WEBDEV

A Looper control includes:
  • controls, that are repeated on each row.
  • attributes. An attribute defines the control characteristic that will change on each row. For example, if the value and color of the PRICE control must change on each row, you need to define two different attributes for the same control.
To get or set the characteristics of a control (value, color, etc.), simply manipulate the control or the corresponding attribute programmatically.
WINDEVAndroidiPhone/iPadJava

Attributes of a Looper control in WINDEV or WINDEV Mobile

A Looper control includes controls that are repeated on each row.
WINDEVWindows The content of the Table or Chart control can be different for each row, for example. For more details, see Displaying different content on each row.
To get or set the characteristics of a control (value, color, etc.), simply manipulate it programmatically.
Remark: For WEBDEV compatibility, it is also possible to use the following attributes. In this case, to get or set the characteristics of a control (value, color, etc.), simply manipulate the control or the corresponding attribute programmatically.
Vocabulary
To easily handle a Looper control, you must be familiar with the following vocabulary:
NameDefinition
AttributeAn 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.).
WINDEVWINDEV Mobile Reminder: Attributes are not mandatory.
Looper based on a data fileThe 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 programmaticallyThe 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 variableThe Looper control is based on a variable (global to the project, window, page, class member, etc.).
Notes

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:
  1. Select the Table control to transform.
  2. 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:
  1. Select the desired controls.
  2. On the "Modificación" tab, in the "Transformaciones" group, expand "Refactorización y permutaciones" and select "Create a looper from the selection".
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 14/09/2024

Señalar un error o enviar una sugerencia | Ayuda local