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
  • Attributes and controls of a Looper control based on a data file
  • Attributes and controls of a Looper control based on a data file in WINDEV or WINDEV Mobile
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
This type of Looper control uses data from a data file or query.
Each row found in the Looper control corresponds to a record of the data source.
The number of records that can be viewed is unlimited, only the visible rows of control are loaded in memory.
The Live Data (available in the editor) is used to easily resize the controls found in the rows.
Attributes and controls of a Looper control based on a data file
WINDEVJava

Attributes and controls of a Looper control based on a data file in WINDEV or WINDEV Mobile

A Looper control includes controls that are repeated on each row.
For new Looper controls based on a data file, a control is created for each item from the data file or query.
To modify one or more characteristics of these controls (color, state, width, height,...), simply handle them through programming in the "Display a row" event of the Looper control.
For example, the Looper control "LOOP_MyLooper" is based on the data file "Customer". This data file contains 10 items (name, address and phone number of each customer for example). When creating the RepeatString Looper control, 10 fields are automatically created: each field is linked to an item in the "Customer" data file.
To get a different background color for "EDT_CustomerName" on each row, simply handle this control through programming to set the desired background color. For example:
// -- Displaying a row of LOOP_MyLooper
Index is int
// Retrieve the index of the current row
Index = LOOP_MyLooper
 
IF IsEven(Index) = True THEN
// The background color will be red for the even rows
LOOP_MyLooper[Index].EDT_CustomerName.BackgroundColor = LightRed
ELSE
// The background color will be blue for the odd rows
LOOP_MyLooper[Index].EDT_CustomerName.BackgroundColor = LightBlue
END
Note: For WEBDEV compatibility, attributes can also be used.
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: 05/12/2024

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