ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Looper control
  • Overview
  • Initializing a Looper control populated programmatically
  • Adding rows in a Looper control populated programmatically
  • Remark
  • Selecting a row
  • Modifying the attributes or controls of a row
  • Modifying all the attributes or controls of a row
  • Modifying an attribute or a control
  • Deleting a row
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Overview
Here is an overview of how to handle Looper controls populated programmatically in WLanguage. There are multiple WLanguage functions to handle this type of control.
Do not hesitate to see the documentation about these functions. For more details, see Looper control management functions.
Initializing a Looper control populated programmatically
Rows are not automatically created in a Looper control. This must be specified by calling:
Adding rows in a Looper control populated programmatically
Rows can be added in a Looper control populated programmatically:

Remark

To make the code easier to read, you can use the following method:
  1. Add an empty row.
  2. Assign each attribute or control one by one.
An error automatically occurs when deleting an attribute or a control. However, the display time may be longer.

Selecting a row

A row cannot be selected.
Modifying the attributes or controls of a row

Modifying all the attributes or controls of a row

To edit the attributes or controls of a specific row, use <Looper>.Modify or <Looper>.ModifyLine and specify the index of the row to be modified.
For example:
// Modify the row #3
LOOP_Looper1.Modify("Highlander" + TAB + "103min" + TAB + "Unknown" + ...
TAB + "C. Lambert" + TAB + "" + TAB + "RO120", 3)
To edit the attributes or controls of the current row, there is no need to specify the index.

Modifying an attribute or a control

To modify an attribute or a control, specify the name of the attribute or control to modify.
  • Modifying the attribute or control of a specific row: The row index must be specified.
  • Modifying an attribute or control in the current row: There is no need to specify the index.
Deleting a row
The deletion of a row must be explicitly requested by <Looper>.Delete. The following syntax is used:
<Looper control>.Delete([Index])
If the index is specified, <Looper>.Delete deletes the row that corresponds to that index. Otherwise, the current row is deleted. For example:
LOOP_CUSTOMER.Delete()
Deleting a row in a Looper control also deletes all the values of the attributes or controls for that row.
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help