PC SOFT

WINDEV的在线文档

  • Overview
  • Initializing the different controls/attributes of a Looper control
  • Retrieving the value of the different controls/attributes found in a Looper control
  • Retrieving the value of the different controls/attributes of a row found in a Looper control
  • Content of the current row
  • Content of a specific row
  • Positioning on a specific row
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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
WinDev, WinDev Mobile and WebDev allow you to handle a Looper control by programming. To do so, use the variable of the Looper control in the code.

The variable of the Looper control corresponds to the name of the Looper control. This variable is an integer.

Initializing the different controls/attributes of a Looper control
To initialize the different controls/attributes of a Looper control:
<Looper Name>[<Subscript>].<Control Name>..<Property Name> = <Value>

  • handle each control found in all the looper rows:
<Looper Name>.<Control Name>..<Property Name> = <Value>
If <Property Name> corresponds to ..值, the value of the specified control for the current row is modified.

  • handle each attribute of the Looper control:
<Attribute Name>[<Subscript>] = <Value>

  • handle each attribute of the Looper control for the current row:
<Attribute Name> = <Value>

For example:

  • Change the value of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for row #8:
LOOP_Customer8】.EDT_CustomerName..值="Montgomery"
// Equivalent to: LOOP_Customer[8].EDT_CustomerName = "Montgomery"
// In WebDev, an attribute used to modify the value
// of "EDT_CustomerName" must exist

  • Change the value of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for the current row:
LOOP_Customer.EDT_CustomerName..值="Montgomery"
// Equivalent to: LOOP_Client.EDT_CustomerName = "Montgomery"
// In WebDev, an attribute used to modify the value
// of "EDT_CustomerName" must exist

  • Change the background color of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for row #8:
LOOP_Customer8】.EDT_CustomerName..背景颜色=深蓝色
// In WebDev, an attribute used to modify the background color
// of "EDT_CustomerName" must exist

  • Make the "EDT_CustomerPhone" control invisible in the "LOOP_Customer" looper control for all the rows:
LOOP_Customer.EDT_CustomerPhone..可见=
// In WebDev, an attribute used to modify the visibility
// of "EDT_CustomerPhone" must exist

  • Modify the width of the "EDT_CustomerAddress" control linked to the "ATT_WidthAttribute" attribute in the "LOOP_Customer" looper control for row #8:
ATT_WidthAttribute8】+=100
// Equivalent to: LOOP_Customer[8].EDT_CustomerAddress..Width += 100

  • Modify the width of the "EDT_CustomerAddress" control linked to the "ATT_WidthAttribute" attribute in the "LOOP_Customer" looper control for the current row:
ATT_WidthAttribute+=100

Note: These code lines must be found in the "Displaying a row of Looper control" process.

Retrieving the value of the different controls/attributes found in a Looper control
To retrieve the value of the different controls/attributes found in a Looper control:
  • handle each control found in the Looper control:
<Value> = <Looper Name>[<Subscript>].<Control Name>..<Property Name>

  • handle each control found in the looper for the current row:
<Value> = <Looper Name>.<Control Name>..<Property Name>

  • handle each attribute of the Looper control:
<Value> = <Attribute Name>[<Subscript>]

  • handle each attribute of the Looper control for the current row:
<Value> = <Attribute Name>

For example:

  • Find out the value of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for row #8:
ResCustomerNameLOOP_Customer8】.EDT_CustomerName..值
// Equivalent to: ResCustomerName = LOOP_Customer[8].EDT_CustomerName
// In WebDev, an attribute used to modify the value
// of "EDT_CustomerName" must exist

  • Find out the value of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for the current row:
ResCustomerNameLOOP_Customer.EDT_CustomerName..值
// Equivalent to: ResCustomerName = LOOP_Customer.EDT_CustomerName
// In WebDev, an attribute used to modify the value
// of "EDT_CustomerName" must exist

  • Find out the background color of the "EDT_CustomerName" control in the "LOOP_Customer" looper control for row #8:
ResColorLOOP_Customer8】.EDT_CustomerName..背景颜色
// In WebDev, an attribute used to modify the background color
// of "EDT_CustomerName" must exist

  • Find out the width of the "EDT_CustomerAddress" control linked to the "ATT_WidthAttribute" attribute in the "LOOP_Customer" looper control for row #8:
ResWidthATT_WidthAttribute8
// Equivalent to: ResWidth = LOOP_Customer[8].EDT_CustomerAddress..Width

  • Find out the width of the "EDT_CustomerAddress" control linked to the "ATT_WidthAttribute" attribute in the "LOOP_Customer" looper control for the current row:
ResWidthATT_WidthAttribute
// Equivalent to: ResWidth = LOOP_Customer.EDT_CustomerAddress..Width

Retrieving the value of the different controls/attributes of a row found in a Looper control

Content of the current row

To retrieve the content of the current row:

<Value> = <Looper Name>[<Looper Name>]

The result is a character string containing:
  • WinDevWindows Store apps each attribute and/or each control separated by TAB.

Content of a specific row

To retrieve the content of the row whose subscript is <Subscript>:

<Value> = <Looper Name>[<Subscript>]

The result is a character string containing:

  • WinDevWindows Store apps each attribute and/or each control separated by TAB.

Positioning on a specific row
To position on a specific row, use the following syntax:

<Looper Name> = <Subscript>

For example:

// Add an empty row
重复区域添加LOOP_Product
// Position on the empty row
LOOP_Product重复区域元素数目LOOP_Product