PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use conditions
  • Adding an empty row
  • Characteristics of the row
  • Position of added row
  • Handling a binary memo
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
Adds a row at the end of Looper control.
Note: We recommend that you use LooperAddLine. Indeed, LooperAddLine allows you to add:
  • TAB characters into the attributes/controls.
  • all types of values into the attributes/controls.
Versions 15 and later
Android This function is now available for Android applications.
New in version 15
Android This function is now available for Android applications.
Android This function is now available for Android applications.
Versions 16 and later
Universal Windows 10 App This function is now available for Windows Phone applications.
New in version 16
Universal Windows 10 App This function is now available for Windows Phone applications.
Universal Windows 10 App This function is now available for Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for iPhone/iPad applications.
iPhone/iPad This function is now available for iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Example
// Initialize the Looper control named LOOP_LOOPER1
LooperDeleteAll(LOOP_LOOPER1)
HReadFirst(Product, ProdName)
WHILE HOut() = False
LooperAdd(LOOP_LOOPER1, Product.ProdName + TAB + Product.Code)
HReadNext(Product, ProdName)
END
// Add an empty row
LooperAdd(LOOP_Looper1)
// Position on the empty row
Subscript = LooperCount(LOOP_Looper1)
// Then, initialize the attributes
ATT_AttributeLastName[Subscript] = "Hobbes"
ATT_AttributeFirstName[Subscript] = "Samantha"

// Or initialize the controls
// LOOP_Looper1[Subscript].ControlLastName = "Hobbes"
// LOOP_Looper1[Subscript].ControlFirstName = "Samantha"
Syntax

Adding a row to a Looper control with attributes Hide the details

<Result> = LooperAdd(<Looper control> [, <Value>])
<Result>: Boolean
  • True if the addition was successful,
  • False otherwise.
<Looper control>: Control name
Name of Looper control to use.
If this parameter is equal to an empty string (""), the addition will be performed into the current Looper control.
<Value>: Optional character string (with quotes)
List of values that will be inserted into the new row. This parameter must have the following format:
<Value 1> + TAB + ... + <Value N>

The different values must be specified in the order of attributes (description window of Looper control).
To specify no value for one of the attributes, use an empty string ("") or 0 (depending on the type of attribute).
An empty row will be added if this parameter corresponds to an empty string ("").
AndroidiPhone/iPadUniversal Windows 10 App

Adding a row to a Looper control without attributes Hide the details

<Result> = LooperAdd(<Looper control>)
<Result>: Boolean
  • True if the addition was successful,
  • False otherwise.
<Looper control>: Control name
Name of Looper control to use.
If this parameter is equal to an empty string (""), the addition will be performed into the current Looper control.
Remarks

Use conditions

LooperAdd can be used on a browsing or memory Looper control.

Adding an empty row

Once an empty row was added, each attribute or each control must be initialized one by one.
For example:
  • For a Looper control with attributes:
    // Add an empty row
    LooperAdd(LOOP_Looper1)

    // Position on the empty row
    Subscript = LooperCount(LOOP_Looper1)
    // Then, initialize the attributes
    ATT_AttributeLastName[Subscript] = "Hobbes"
    ATT_AttributeFirstName[Subscript] = "Samantha"
    ATT_ColorAttributeFirstName[Subscript] = LightRed
    ATT_AttributeAddressVisible[Subscript] = False
  • For a Looper control without attributes:
    // Add an empty row
    LooperAdd(LOOP_Looper1)

    // Position on the empty row
    Subscript = LooperCount(LOOP_Looper1)
    // Then, initialize the controls
    LOOP_Looper1[Subscript].ControlLastName = "Hobbes"
    LOOP_Looper1[Subscript].ControlFirstName = "Samantha"
    LOOP_Looper1[Subscript].ControlFirstName..BrushColor = LightRed
    LOOP_Looper1[Subscript].ControlAddress..Visible = False

Characteristics of the row

If a value corresponds to the result of a calculation, the numeric expression must be enclosed in brackets. For example:
LooperAdd(LOOP_CalcLooper, (53+29) + TAB + (83-21))

Position of added row

By default, the row is added at the end of the Looper control.
If the Looper control is sorted (LooperSort), the added row is positioned in the Looper control according to the current sort.

Handling a binary memo

To add a binary memo into a Looper control, use LooperAddLine.
Component : wd240obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment