|
|
|
|
|
- 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: creating a Looper control from the selected controls
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 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: - be defined programmatically: this is referred to as Looper control populated programmatically.
- come from a data file or query: this is referred to as Looper control based on a data file.
- come from a WLanguage variable: this is referred to as Looper control based on a variable.
- 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:- Looper with in-memory data source: The content of the looper is loaded in memory, then displayed. The access to the different control elements is faster. This mode is reserved for data files with less than 100,000 records.
- Looper with direct access to the data source (no limit): The Looper control displays the content of the data file or query directly. 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 (by 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 "Modification" tab, in the "Transformations" group, expand "Refactoring and swapping" and select "Table to Looper".
Refactoring: creating a Looper control from the selected controls WINDEV, WINDEV Mobile and WEBDEV allow you to automatically create a Looper control from the controls currently selected: - Select the desired controls.
- On the "Modification" tab, in the "Transformations" group, expand "Refactoring and swapping" and select "Create a looper from the selection".
Related Examples:
|
Unit examples (WEBDEV): The Looper control (display the bounds)
[ + ] This example explains how to display the bounds of a looper with custom pager.
|
|
Unit examples (WEBDEV): Displaying/Hiding an input area
[ + ] This example explains how to display/hide an input area via a looper. Adding an input area is performed by adding a row in the looper.
|
|
Unit examples (WEBDEV): The Looper control (selection bar)
[ + ] This example explains how to simulate a selection bar in a looper
|
|
Unit examples (WEBDEV): The Looper control (modify the number of rows displayed)
[ + ] This example explains how to modify the number of rows displayed in a looper.
|
|
Unit examples (WEBDEV): The Ajax Looper control
[ + ] This example explains how to use the Ajax looper. This example allows you to: - Clear the looper - Fill the looper - Sort the looper
|
|
Unit examples (WEBDEV): The Ajax Looper control in PHP
[ + ] This example presents the use of Ajax loopers in PHP. This example allows you to: - Clear the looper - Fill the looper - Sort the looper
|
|
Unit examples (WINDEV): The Looper control
[ + ] Using the Looper control. You have the ability to add a row with LooperAddLine. The following syntax is used to retrieve the existing values: AttributeName[Subscript]
|
|
Complete examples (WEBDEV): webmillion
[ + ] The following topics are presented in this example: 1/ Using queries 2/ Using "browsing" loopers in automatic browse 3/ Using "browsing" loopers in manual browse Summary of the example supplied with WEBDEV: This Web application, powered by WEBDEV, is used to display, find and order tee-shirts. Once the order is placed, you have the ability to use the PayBox module for secure payment. This example contains a page used to generate a data file containing an important number of records.
|
|
Cross-platform examples (WINDEV Mobile): WM Managing Contacts
[ + ] This example presents the management of contacts for Android et iOS. It is used o: - list the contacts found on the phone - call the contacts - send SMSs to the contacts - ...
|
|
Cross-platform examples (WINDEV Mobile): WM ToDo List
[ + ] This example is a manager of To-Do Lists. The project is using the gestures in the loopers in order to move and delete the lists and tasks. The data is stored in a HFSQL database.
|
|
Cross-platform examples (WINDEV Mobile): WM Attendance
[ + ] This application is an attendance manager. It allows you to list the persons who attended a meeting. The database is filled beforehand with the list of registered persons. You have the ability to find a person by using his/her name. The following topics are presented in this example: 1/ using a browsing looper based on a query 2/ using a database in HFSQL format.
|
|
Complete examples (WEBDEV): Photo_Gallery
[ + ] This example is a photo gallery site and is composed of 2 main parts: - the "visitor" part, developed in Active WEBDEV Page mode and SEO-compatible. - the administration part, secured and developed in standard WEBDEV mode. These are some of the available features: - organize photos via albums - include links to social networks - enable users to comment on posts - user login via WEBDEV'S GPU - contact form - ability to upload, describe, and classify photos via albums on the administration side
|
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|