PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • 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 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.
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:
    <Nom Zone répétée>[<Indice>].<Nom Champ>.<Nom Propriété> = <Valeur>

  • use all the looper rows in each control:
    <Nom Zone répétée>.<Nom Champ>.<Nom Propriété> = <Valeur>

    If <Property name> corresponds to Value, only the value of the control specified for the current row is modified.
  • handle each attribute of the Looper control:
    <Nom Attribut>[<Indice>] = <Valeur>
  • handle each attribute of the Looper control for the current row:
    <Nom Attribut> = <Valeur>
For example:
  • Change the value of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for row #8:
    ZR_Client[8].SAI_NomClient.Valeur = "Montgomery"
    // Equivalent à: ZR_Client[8].SAI_NomClient = "Montgomery"
    // En WEBDEV, un attribut permettant de modifier la valeur
    // du champ "SAI_NomClient" doit exister
  • Change the value of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for the current row:
    ZR_Client.SAI_NomClient.Valeur = "Montgomery"
    // Equivalent à: ZR_Client.SAI_NomClient = "Montgomery"
    // En WEBDEV, un attribut permettant de modifier la valeur
    // du champ "SAI_NomClient" doit exister
  • Change the background color of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for row #8:
    ZR_Client[8].SAI_NomClient.CouleurFond = DarkBlue
    // En WEBDEV, un attribut permettant de modifier la couleur de fond
    // du champ "SAI_NomClient" doit exister
  • Make the "EDT_CustomerPhone" control invisible in the "LOOP_Customer" looper control for all rows:
    ZR_Client.SAI_TelClient.Visible = False
    // En WEBDEV, un attribut permettant de modifier la visibilité
    // du champ "SAI_TelClient" doit exister
  • Modify the width of the "EDT_CustomerAddress" control linked to the "ATT_WidthAttribute" attribute in the "LOOP_Customer" looper control for row #8:
    ATT_AttributLargeur[8] += 100
    // Equivalent à: ZR_Client[8].SAI_AdresseClient.Largeur += 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_AttributLargeur += 100
Remark: These lines of code must be present in the row"Display ALFREDA" event of the Looper control.
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:
    <Valeur> = <Nom Zone répétée>[<Indice>].<Nom Champ>.<Nom Propriété>

  • handle each control found in the looper for the current row:
    <Valeur> = <Nom Zone répétée>.<Nom Champ>.<Nom Propriété>

  • handle each attribute of the Looper control:
    <Valeur> = <Nom Attribut>[<Indice>]
  • handle each attribute of the Looper control for the current row:
    <Valeur> = <Nom Attribut>
For example:
  • Find out the value of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for row #8:
    ResNomClient = ZR_Client[8].SAI_NomClient.Valeur
    // Equivalent à: ResNomClient = ZR_Client[8].SAI_NomClient
    // En WEBDEV, un attribut permettant de modifier la valeur
    // du champ "SAI_NomClient" doit exister
  • Find out the value of the "EDT_CustomerName" edit control in the "LOOP_Customer" looper control for the current row:
    ResNomClient = ZR_Client.SAI_NomClient.Valeur
    // Equivalent à: ResNomClient = ZR_Client.SAI_NomClient
    // En WEBDEV, un attribut permettant de modifier la valeur
    // du champ "SAI_NomClient" doit exister
  • Find out the background color of the "EDT_CustomerName" control in the "LOOP_Customer" looper control for row #8:
    ResCouleur = ZR_Client[8].SAI_NomClient.CouleurFond
    // En WEBDEV, un attribut permettant de modifier la couleur de fond
    // du champ "SAI_NomClient" doit exister
  • Find out the width of the "EDT_CustomerAddress" control linked to the "ATT_WidthAttribute" attribute in the "LOOP_Customer" looper control for row #8:
    ResLargeur = ATT_AttributLargeur[8]
    // Equivalent à: ResLargeur = ZR_Client[8].SAI_AdresseClient.Largeur
  • 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:
    ResLargeur = ATT_AttributLargeur
    // Equivalent à: ResLargeur = ZR_Client.SAI_AdresseClient.Largeur
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 current row:
<Valeur> = <Nom Zone répétée>[<Nom Zone répétée>]
The result is a character string containing:
  • WINDEVUniversal Windows 10 AppJava each attribute and/or each control separated by TAB.

Content of specific row

To retrieve the content of the row whose subscript is <Subscript>:
<Valeur> = <Nom Zone répétée>[<Indice>]
The result is a character string containing:
  • WINDEVUniversal Windows 10 AppJava each attribute and/or each control separated by TAB.
Positioning on a specific row
To position on a specific row, use the following syntax:
<Nom Zone répétée> = <Indice>
For example:
// Ajout d'une répétition vide
LooperAdd(ZR_Produit)
// Positionnement sur la répétition vide
ZR_Produit = LooperCount(ZR_Produit)
Minimum version required
  • Version 10
This page is also available for…
Comments
Click [Add] to post a comment