PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Browsing Looper control automatically initialized
  • Browsing Looper control initialized by programming
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Looper control linked to a data file
Overview
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:
  • automatically: No specific code is required to initialize the Looper control. The characteristics of the browse performed in the data file linked to the control are described in the "Content" tab of control description.
  • by programming: The code used to browse the data file linked to the Looper control must be entered in the different processes of the control. This method is not recommended.
Note: When creating a Looper control, the wizard asks for the information required to create a Looper control linked to a data file or to a query.
Browsing Looper control automatically initialized
A browsing Looper control is used to display data coming from a specific data source (data file, query, ...).
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 control is a browsing Looper control, a memory Looper control or a Looper control on variable. For a browsing Looper control, this tab is used to define the characteristics of the browse performed in the data source:
  • Browsed file
Data file or query containing the data to display.
  • Stored item (optional)
Item whose value is returned to the program when a row element is selected.
  • Automatic browse
If this option is checked, WINDEV, WINDEV Mobile or WEBDEV manage the browse of the data file and the display of data in the Looper control. No WLanguage code is required.
  • Search item
Item used to browse the data source. The information displayed in the Looper control will be sorted according to this item.
  • Reverse browse
The browse direction depends on the search item. The browse direction was defined in the data model editor, in the characteristics of the item.
If this option is checked, the browse direction used will be the reverse 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 filter is a "Start with" filter and it is applied to the search item. To implement more complex filters, use HFilter.
Browsing Looper control initialized by programming
If you are using a Looper control based on a data file with programmed initialization, the code for browsing the data file must be entered in the different processes associated with the control. This method is not recommended and it is kept for backward compatibility.
For example: Initializing a Looper control with the products found in the Product data file.
// The LOOP_LOOPER1 Looper control contains 5 captions and an image
// 6 attributes are used to modify the value of captions and the image displayed
// Initialize the looper from the content of a HFSQL data file
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
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment