PC SOFT

WINDEV的在线文档

  • Overview
  • Browsing Looper control automatically initialized
  • Browsing Looper control initialized by programming
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

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 the 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 H过滤器.

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
H读第一个ProductProductName
只要不H超出()
重复区域添加LOOP_LOOPER1Product.ProductName+TAB+Product.Duration+...
TAB+Product.Director+TAB+Product.Actor+...
TAB+Product.Photo+TAB+Product.Designation
H读下一个ProductProductName
结束