PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use conditions
  • Adding an empty row
  • Characteristics of the row
  • Sort
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
Inserts a row into a browsing or memory Looper control.
Remark: To add elements at the end of Looper control, use <Looper>.AddLine.
Versions 16 and later
WINDEVLinux This function is now available for WINDEV applications in Linux.
Universal Windows 10 App This function is now available for Windows Phone applications.
New in version 16
WINDEVLinux This function is now available for WINDEV applications in Linux.
Universal Windows 10 App This function is now available for Windows Phone applications.
WINDEVLinux This function is now available for WINDEV applications in Linux.
Universal Windows 10 App This function is now available for Windows Phone 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
// Add values into the Looper control at position 12
LOOP_Looper1.InsertLine(12, LastName, FirstName, PhoneNum, FaxNum)
// Insert sought information into the database
i is int = 1
LOOP_LOOPER1.DeleteAll()
HReadSeek(Product, ProdName, "Window")
WHILE HOut() = False
LOOP_LOOPER1.InsertLine(i, Product.ProdName, Product.Code)
HReadNext(Product, ProdName)
i ++
END
Syntax

Inserting a row in a Looper control with attributes Hide the details

<Looper control>.InsertLine([<Subscript> [, <Value 1> [, <Value N>]]])
<Looper control>: Control name
Name of Looper control to use.
<Subscript>: Optional integer
Subscript of row from which the new row will be inserted.
  • If this parameter is not specified or if it is equal to -1, the insertion will be performed before the current row. If no row is selected, the insertion will be performed at the end of Looper control.
  • If <Subscript> is greater than the number of rows, the insertion will be performed at the end of Looper control. In this case, <Looper>.InsertLine is equivalent to <Looper>.AddLine.
  • If this parameter is equal to 0, the insertion will be performed at the beginning of Looper control.
<Value 1>: Type of associated attribute (optional)
Value of 1st attribute for the row to insert into the specified Looper control.
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).
If none of these parameters is specified, an empty row is inserted into the Looper control.
<Value N>: Type of associated attribute (optional)
Value of N attribute for the row to insert into the specified Looper control.
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).
If none of these parameters is specified, an empty row is inserted into the Looper control.
WINDEVUniversal Windows 10 AppJavaUser code (UMC)

Inserting a row in a Looper control without attributes Hide the details

<Looper control>.InsertLine([<Subscript>])
<Looper control>: Control name
Name of Looper control to use.
<Subscript>: Optional integer
Subscript of row from which the new row will be inserted.
  • If this parameter is not specified or if it is equal to -1, the insertion will be performed before the current row. If no row is selected, the insertion will be performed at the end of Looper control.
  • If <Subscript> is greater than the number of rows, the insertion will be performed at the end of Looper control. In this case, <Looper>.InsertLine is equivalent to <Looper>.AddLine.
  • If this parameter is equal to 0, the insertion will be performed at the beginning of Looper control.
Remarks

Use conditions

<Looper>.InsertLine 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
    LOOP_LOOPER1.InsertLine(14)

    // Position on the empty row
    Subscript = LOOP_LOOPER1.Count()
    // Then, initialize the attributes
    AttributeLastName[Subscript] = "Hobbes"
    AttributeFirstName[Subscript] = "Samantha"
    AttributeFirstNameColor[Subscript] = LightRed
    AttributeAddressVisible[Subscript] = False
  • For a Looper control without attributes:
    // Add an empty row
    LOOP_LOOPER1.InsertLine(14)

    // Position on the empty row
    Subscript = LOOP_LOOPER1.Count()
    // 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:
LOOP_CalculationZone.InsertLine(10, (53+29), (83-21))

Sort

<Looper>.InsertLine ignores the sort.
Component : wd250obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment