PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

  • 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 current row
  • Content of a specific row
  • Positioning on a specific row
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
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.
WEBDEV - Server code A Looper control must be exclusively handled via its attributes.
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:
  • use LooperAdd or LooperAddLine.
  • use each looper control:
    <Looper Name>[<Subscript>].<Control Name>..<Property Name> = <Value>

    WEBDEV - Server code An attribute linked to the specified control and used to modify the specified property must exist.
  • use all the looper rows in each control:
    <Looper Name>.<Control Name>..<Property Name> = <Value>

    If <Property Name> corresponds to ..Value, only the value of the specified control for the current row is modified.
    WEBDEV - Server code An attribute linked to the specified control and used to modify the specified property must exist.
  • 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_Customer[8].EDT_CustomerName..Value = "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..Value = "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_Customer[8].EDT_CustomerName..BrushColor = DarkBlue
    // 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..Visible = False
    // 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_WidthAttribute[8] += 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>

    WEBDEV - Server code In this case, an attribute linked to the specified control and used to modify the specified property must exist.
  • handle each control found in the looper for the current row:
    <Value> = <Looper Name>.<Control Name>..<Property Name>

    WEBDEV - Server code In this case, an attribute linked to the specified control and used to modify the specified property must exist.
  • 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:
    ResCustomerName = LOOP_Customer[8].EDT_CustomerName..Value
    // 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:
    ResCustomerName = LOOP_Customer.EDT_CustomerName..Value
    // 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:
    ResColor = LOOP_Customer[8].EDT_CustomerName..BrushColor
    // 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:
    ResWidth = ATT_WidthAttribute[8]
    // 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:
    ResWidth = ATT_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 current row

To retrieve the content of the current row:
<Value> = <Looper Name>[<Looper Name>]
The result is a character string containing:
  • WEBDEV - Server code each attribute separated by TAB.
  • WINDEVWINDEV MobileAndroidiPhone/iPadUniversal Windows 10 AppJava 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:
  • WEBDEV - Server code each attribute separated by TAB.
  • WINDEVWINDEV MobileAndroidUniversal Windows 10 AppJava each attribute and/or each control separated by TAB.
WEBDEV - Server code Caution: The subscript must correspond to a row that is visible in the current page.
Positioning on a specific row
To position on a specific row, use the following syntax:
<Looper Name> = <Subscript>
For example:
// Add an empty row
LooperAdd(LOOP_Product)
// Position on the empty row
LOOP_Product = LooperCount(LOOP_Product)
Minimum required version
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment