PC SOFT

WINDEV的在线文档

  • Overview of the Looper control
  • Creating a Looper control
  • Creating an horizontal Looper control
  • Attributes of a Looper control
  • 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
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Overview of the Looper control
A Looper control is used to repeat the controls found in a specific area. More precisely, a Looper control is a "container" control that is used to repeat several times all the controls (edit controls, static controls, combo boxes, ...) included in it.

The Looper control simplifies the display and the input of information.

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 by programming: we talk of memory Looper control.
  • come from a data file or from a query: we talk of browsing Looper control.
  • come from a WLanguage variable: we talk of Looper control on source.

16版本和更高版本
WinDevLinux The Looper control is available for the WinDev applications in Linux.
16新版本
WinDevLinux The Looper control is available for the WinDev applications in Linux.
WinDevLinux The Looper control is available for the WinDev applications in Linux.

18版本和更高版本
WinDevWindows Store apps The Looper control is now available for the applications in Windows Store apps mode.
18新版本
WinDevWindows Store apps The Looper control is now available for the applications in Windows Store apps mode.
WinDevWindows Store apps The Looper control is now available for the applications in Windows Store apps mode.

Notes:
  • 18版本和更高版本
    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 loopers.
    18新版本
    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 loopers.
    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 loopers.

Creating a Looper control
To create a Looper control:
  1. In the window editor or in the page editor, click(or select "Insert .. Control .. Looper").On the "创建" pane, in the "数据" group:
    • WinDev expand "Looper" and select "Looper (vertical)".
  2. Click the position where the control must be created in the window or in the page. The wizard for creating a Looper control is automatically started.
Notes:
  • 20版本和更高版本
    WinDev The dimensions of the created control are optimized in order to occupy the available space at the specified position. If the size of the control does not suit your, press [CTRL Z]: the default size of the control will be restored.
    20新版本
    WinDev The dimensions of the created control are optimized in order to occupy the available space at the specified position. If the size of the control does not suit your, press [CTRL Z]: the default size of the control will be restored.
    WinDev The dimensions of the created control are optimized in order to occupy the available space at the specified position. If the size of the control does not suit your, press [CTRL Z]: the default size of the control will be restored.
To display the characteristics of the control, select "Description" from the popup menu of the control.

For more details:

18版本和更高版本
WinDev

Creating an horizontal Looper control

You also have the ability to create horizontal Looper controls. In this case, the control will include an horizontal scrollbar used to scroll the different rows.

To create an Horizontal Looper control:
  1. On the "创建" pane, in the "数据" group, expand "重复区域" and select "Horizontal looper".
  2. Click the position where the control must be created in the window or in the page. The wizard for creating a Looper control is automatically started.
To display the characteristics of the control, select "Description" from the popup menu of the control.

See Characteristics of a Looper control found in a window for more details.
18新版本
WinDev

Creating an horizontal Looper control

You also have the ability to create horizontal Looper controls. In this case, the control will include an horizontal scrollbar used to scroll the different rows.

To create an Horizontal Looper control:
  1. On the "创建" pane, in the "数据" group, expand "重复区域" and select "Horizontal looper".
  2. Click the position where the control must be created in the window or in the page. The wizard for creating a Looper control is automatically started.
To display the characteristics of the control, select "Description" from the popup menu of the control.

See Characteristics of a Looper control found in a window for more details.
WinDev

Creating an horizontal Looper control

You also have the ability to create horizontal Looper controls. In this case, the control will include an horizontal scrollbar used to scroll the different rows.

To create an Horizontal Looper control:
  1. On the "创建" pane, in the "数据" group, expand "重复区域" and select "Horizontal looper".
  2. Click the position where the control must be created in the window or in the page. The wizard for creating a Looper control is automatically started.
To display the characteristics of the control, select "Description" from the popup menu of the control.

See Characteristics of a Looper control found in a window for more details.

Attributes of a Looper control

WinDevWindows Store apps

Attributes of a Looper control in WinDev or WinDev Mobile

A Looper control includes controls that are repeated on each row.

16版本和更高版本
WinDevWindows The content of the tables, charts, ... can differ in each row. See Display a different content on each row for more details.
16新版本
WinDevWindows The content of the tables, charts, ... can differ in each row. See Display a different content on each row for more details.
WinDevWindows The content of the tables, charts, ... can differ in each row. See Display a different content on each row for more details.

To find out or modify the characteristic of a control (its value, its color, ...), all you have to do is handle this control by programming.

Note: For compatibility with WebDev, you also have the ability to use the attributes. In this case, to find out or modify the characteristic of a control (its value, its color, ...), all you have to do is handle this control or the corresponding attribute by programming.

Vocabulary
To easily handle a Looper control, you must be familiar with the following vocabulary:

NameDefinition
AttributeAn attribute corresponds to the association between the control found in the looper and the property of this control that will be modified on each row.
For each attribute, you must define:
  • the name of the attribute.
  • the name of the control in the looper.
  • the property of the control that will be modified on each row (value, color, ...).
WinDev Reminder: The attributes are not mandatory.
Browsing looperThe Looper control is based on a data file or on a query. A record found in the data file is displayed on each row. Two types of browsing Looper controls are available:
  • Browsing looper "Loaded in memory": The content of the looper is loaded in memory then it is displayed. The access to the different control elements is faster. This mode is reserved for the data files containing less than 100 000 records.
  • Browsing looper in "Direct access (no limit)": The Looper control displays the content of the data file or query directly. The current record corresponds to the selected element. Each move performed in the control involves an access to the linked data file. This mode is reserved for the data files containing more than 100 000 records.
Memory LooperThe 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 on sourceThe Looper control is based on a variable (global to the project, to the window or to the page, class member, ...).

Notes

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:
  1. Select the Table control to transform.
  2. Select "Control .. Swap .. Table to Looper".On the "修改" pane, in the "转换" group, expand "重构和切换" 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:
  1. Select the requested controls.
  2. Select "Control .. Refactoring .. Create a looper from the selection".On the "修改" pane, in the "转换" group, expand "重构和切换" and select "Create a looper from the selection".