- Use conditions
- Adding an empty row
- Characteristics of the row
- Sort
LooperInsertLine (Function) In french: ZoneRépétéeInsèreLigne
// Add values into the Looper control at position 12 LooperInsertLine(LOOP_Looper1, 12, LastName, FirstName, PhoneNum, FaxNum)
// Insert searched information into the database i is int = 1 LooperDeleteAll(LOOP_LOOPER1) HReadSeek(Product, ProdName, "Window") WHILE HOut() = False LooperInsertLine(LOOP_LOOPER1, i, Product.ProdName, Product.Code) HReadNext(Product, ProdName) i ++ END
Syntax
Inserting a row in a Looper control with attributes Hide the details
LooperInsertLine(<Looper control> [, <Subscript> [, <Value 1> [, <Value N>]]])
<Looper control>: Control name Name of Looper control to use. If this parameter corresponds to an empty string (""), the insertion will be performed into the current Looper control <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, LooperInsertLine is equivalent to LooperAddLine.
- 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 the attributes (Looper control description window). 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 the attributes (Looper control description window). 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. Remarks Use conditions LooperInsertLine 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 LooperInsertLine(LOOP_Looper1, 14) // Then, initialize the attributes AttributeLastName[14] = "Hobbes" AttributeFirstName[14] = "Samantha" AttributeFirstNameColor[14] = LightRed AttributeAddressVisible[14] = False
- For a Looper control without attributes:
// Add an empty row LooperInsertLine(LOOP_Looper1, 14) // Then, initialize the controls LOOP_Looper1[14].LastNameControl = "Hobbes" LOOP_Looper1[14].FirstNameControl = "Samantha" LOOP_Looper1[14].ControlFirstName..BackgroundColor = LightRed LOOP_Looper1[14].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:
LooperInsertLine(LOOP_CalculationLooper, 10, (53+29), (83-21))
Sort LooperInsertLine ignores the sort.
This page is also available for…
|
|
|