|
|
|
|
|
- Use conditions
- Multi-selection Looper
- Handling errors
LooperMoveLine (Function) In french: ZoneRépétéeDéplaceLigne Moves a row or swaps two rows in a Looper control.
// Swap the current row and row 5 LooperMoveLine(LOOP_Looper1, rowSelected, 5, amSwap) // Move the current row to row 3 LooperMoveLine(LOOP_Looper1, rowSelected, 3, amMove) // Swap the current row with the next row LooperMoveLine(LOOP_Looper1, rowSelected, ... amNext, amSwap)
Syntax
Moving to a specific position Hide the details
<Result> = LooperMoveLine(<Looper control> , <Index of row to move> , <Destination row index> [, <Operation to perform>])
<Result>: Integer New index of the row that was moved. <Looper control>: Control name Name of the Looper control to be used. If this parameter corresponds to an empty string (""), the Looper control to which the current process belongs will be used. <Index of row to move>: Integer Position of the row to move. This position must be included between 1 and the number of rows found in the control (returned by LooperCount or Count for example).To move the row that is currently selected, use the rowSelected constant. <Destination row index>: Integer New row position. This position must be included between 1 and the number of rows found in the control (returned by LooperCount or Count for example). A fatal error occurs if this parameter is not valid.To handle the row currently selected, use the rowSelected constant. <Operation to perform>: Optional Integer constant (or combination of constants) Change of position that will be performed for the row: | | amDisplayDestination | The modified row is displayed in the Looper control. If necessary, an automatic scroll of rows is performed to display the modified row. The selected row (selection bar) does not change. This constant can be combined with the amMove and amSwap constants. | amMove (default value) | The row is moved to the index of the destination row. | amSwap | The source row and the destination row are swapped. |
Moving relatively to the current position Hide the details
<Result> = LooperMoveLine(<Looper control> , <Index of row to move> , <Relative move> [, <Operation to perform>])
<Result>: Integer New index of the row that was moved. <Looper control>: Control name Name of the Looper control to be used. If this parameter corresponds to an empty string (""), the Looper control to which the current process belongs will be used. <Index of row to move>: Integer Position of the row to move. This position must be included between 1 and the number of rows found in the control (returned by LooperCount or Count for example).To move the row that is currently selected, use the rowSelected constant. <Relative move>: Integer constant Used to move or a swap to a position relative to the index of the row to move. | | amFirst | Moves the row to first position. | amLast | Moves the row to last position. | amNext | Moves the row one position to the bottom. | amNextPage | Moves the row one page to the bottom (a page corresponds to the number of rows that can be simultaneously displayed in the Looper control). | amPrevious | Moves the row one position upwards. | amPreviousPage | Moves the row one page to the top (a page corresponds to the number of rows that can be simultaneously displayed in the Looper control). |
If this parameter is invalid (amPrevious used on the first row of the Looper control for example), the row is moved "to the nearest" position. <Operation to perform>: Optional Integer constant (or combination of constants) Change of position that will be performed for the row: | | amDisplayDestination | The modified row is displayed. If necessary, an automatic scroll of rows is performed to display the modified row. The selected row (selection bar) does not change. This constant can be combined with the amMove and amSwap constants. | amMove (default value) | The row is moved to the index of the destination row. | amSwap | The source row and the destination row are swapped. |
Remarks Use conditions LooperMoveLine can be used on: - a Looper control with in-memory data source,
- a Looper control populated programmatically.
Handling errors Caution: LooperMoveLine returns no error code. To determine if this function has generated an error, use ErrorInfo with the errMessage constant.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|