ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

New WEBDEV 28 feature!
Help / WLanguage / WLanguage functions / Controls, pages and windows / Looper functions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Inserts a row as an internal page into a Looper control populated programmatically.
Caution: To use this function, the "Use an internal page per row (LooperAddIP function)" option must be checked ("Content" tab of the control description).
Example
LOOP_Component.InsertIP(1, IPAGE_PROCESSOR, "i7", 2)
LOOP_Component.InsertIP(2, IPAGE_DISK, "SAMDATA", "SSD", 20 000 000)
Syntax
<Looper control>.InsertIP(<Index> , <Internal page> [, <Parameter 1> [... [, <Parameter N>]]])
<Looper control>: Control name
Name of the Looper control to be used.
<Index>: Optional integer
Index of the row from which the new row will be inserted as an internal page.
  • If this parameter is equal to -1, the row will be inserted before the current row. If no row is selected, the row will be inserted at the end of the Looper control.
  • If <Index> is greater than the number of rows, the row will be inserted at the last position in the Looper control. In this case, <Looper>.InsertIP is equivalent to <Looper>.AddIP.
  • If this parameter is 0, the row will be inserted at the first position in the Looper control.
<Internal page>: Page name
Name of the internal page to be used to create the row.
<Parameter 1>: Type corresponding to the parameter (optional)
First parameter to be passed to the internal page. This parameter is passed to the "Global declarations" event of the internal page.
<Parameter N>: Type corresponding to the parameter (optional)
Nth parameter to be passed to the internal page. This parameter is passed to the "Global declarations" event of the internal page.
Remarks
  • If one of the controls in the internal page is anchored based on its content, the row height will adapt automatically. Otherwise, the row height will be the height of the internal page in edit mode.
  • The name of the internal page used for a row can be retrieved using the following syntax:
    <Looper control>[Row].Name
  • Parameters passed to the internal page: These parameters are specified in the "Global declarations" event of the internal page. Simply write the following line of code at the start of the event:
    PROCEDURE <Page name>(<Parameter 1> [, ...] [, <Parameter N>])
    For more details, see Page with parameters.
  • Tip: To get the number of a given row (for example, when a button in the internal page is clicked), create an attribute in the Looper control and assign the result of <Looper>.InsertIP to this attribute.
  • Caution: The maximum number of controls that can be created is set to 1000 (the number of controls per row depends on the internal page added).
    The following error occurs if more than 1000 controls are created: "Overflow: the looper contains more than 1000 controls in xxx rows".
Component: wd280page.dll
Minimum version required
  • Version 28
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/22/2023

Send a report | Local help