PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Use conditions
  • Managing the errors
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
LooperMoveLine (Function)
In french: ZoneRépétéeDéplaceLigne
Moves a row or swaps two rows in a Looper control.
Versions 16 and later
Linux This function is now available for WINDEV applications in Linux.
New in version 16
Linux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WINDEV applications in Linux.
Versions 17 and later
WEBDEV - Browser code This function is now available in Browser code.
New in version 17
WEBDEV - Browser code This function is now available in Browser code.
WEBDEV - Browser code This function is now available in Browser code.
Example
// 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> , <Subscript of row to move> , <Subscript of destination row> [, <Operation to perform>])
<Result>: Integer
New subscript of row that was moved.
<Looper control>: Control name
Name of Looper control to use.
If this parameter corresponds to an empty string (""), the Looper control to which the current process belongs will be used.
<Subscript of row to move>: Integer
Position of 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.
<Subscript of destination row>: 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 line that is currently selected, use the lineSelected constant.
<Operation to perform>: Optional Integer constant (or combination of constants)
Change of position that will be performed for the row:
amDisplayDestinationThe 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) is not modified.
This constant can be combined with the amMove and amSwap constants.
amMove
(default value)
The row is moved to the subscript of destination row.
amSwapThe source row and the destination row are swapped.

Moving relatively to the current position Hide the details

<Result> = LooperMoveLine(<Looper control> , <Subscript of row to move> , <Relative move> [, <Operation to perform>])
<Result>: Integer
New subscript of row that was moved.
<Looper control>: Control name
Name of Looper control to use.
If this parameter corresponds to an empty string (""), the Looper control to which the current process belongs will be used.
<Subscript of row to move>: Integer
Position of 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 perform a move or a swap on a position relative to the subscript of row to move.
amLastMoves the row to last position.
amPreviousPageMoves the row one page to the top (a page corresponds to the number of rows that can be simultaneously displayed in the Looper control).
amNextPageMoves the row one page to the bottom (a page corresponds to the number of rows that can be simultaneously displayed in the Looper control).
amPreviousMoves the row one position upwards.
amFirstMoves the row to first position.
amNextMoves the row one position to the bottom.

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:
amDisplayDestinationThe modified row is displayed. If necessary, an automatic scroll of rows is performed to display the modified row. The selected row (selection bar) is not modified.
This constant can be combined with the amMove and amSwap constants.
amMove
(default value)
The row is moved to the subscript of destination row.
amSwapThe source row and the destination row are swapped.
Remarks

Use conditions

LooperMoveLine can be used on a browsing Looper control loaded in memory or on a memory Looper control.
WEBDEV - Browser code This function is not available for the Linear Looper controls. This function is available for Looper controls in browser mode only.
WEBDEV - Server codePHP This function is available for Looper controls in Ajax mode, Looper controls in classic mode and Linear Looper controls.

Managing the errors

Caution: LooperMoveLine returns no error code. To find out whether an error was generated by this function, use ErrorInfo associated with the errMessage constant.
Component : wd240obj.dll
Minimum version required
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment