|
|
|
|
|
- Overview
- RepeatString field linked to a data file and automatically initialized
- RepeatString field linked to a data file and initialized by programming
Looper control linked to a data file
A Looper control can be used to display the content of a data file or the content of a query. When a Looper control is linked to a data file or to a query, the looper can be initialized with the content of the data file or with the content of the query: - or automatically No specific code is required to initialize the RepeatString Looper control. The options to loop through the data file linked to the control can be defined in the "Content" tab of the control description.
- or by programming It is necessary to enter the path code of the data file linked to the RepeatString field in the various field processing operations. This method is not recommended.
Note When creating a RepeatString Looper control, the wizard asks for the various information required to create a RepeatString Looper control linked to a data file or query. RepeatString field linked to a data file and automatically initialized A RepeatString Looper control linked to a data file can be used to display information from a specific data source (data file, query, etc.). The content of the control is defined during its creation and it can be modified in its description window ("Content" tab).
This tab is used to define whether the Tab Control is: - a RepeatString field linked to a data file,
- a RepeatString field displaying programmed data
- a RepeatString Looper control linked to a variable.
In the case of a RepeatString Looper control linked to a data file, this tab is used to determine the characteristics of the data source path: | | | Data file or query containing the data to display. | | Item whose value is returned to the program when a row element is selected. | | If this option is checked, WINDEV, WINDEV Mobile or WEBDEV manage how the data file is looped through and how the data is displayed in the Looper control. No WLanguage code is required. | | Item used to loop through the data source. The information displayed in the Looper control will be sorted according to this item. | | The iteration direction depends on the browse item. The iteration direction is defined in the data model editor, in the characteristics of the item. If this option is checked, the iteration direction used will be the opposite of the one defined in the data model editor. | - Display the records whose search key starts with:
| Condition used to filter the displayed records. This is a "Start with" filter and is applied to the browse item. To implement more complex filters, use HFilter. |
RepeatString field linked to a data file and initialized by programming If you use a RepeatString field linked to a data file with programmed initialization, it is necessary to enter the path code of the data file in the various events associated with the field. This method is not recommended and is only kept for backward compatibility. For example Initialization of a Looper control RepeatString with products from the data file Product.
HReadFirst(Product, ProductName)
WHILE NOT HOut()
LooperAdd(LOOP_LOOPER1, Product.ProductName + TAB + Product.Duration + ...
TAB + Product.Director + TAB + Product.Actor + ...
TAB + Product.Photo + TAB + Product.Designation)
HReadNext(Product, ProductName)
END
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|