PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Use conditions
  • Multi-selection looper
  • 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 15 and later
Android This function is now available for the Android applications.
New in version 15
Android This function is now available for the Android applications.
Android This function is now available for the Android applications.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Universal Windows 10 App This function is now available for the Windows Phone applications.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Universal Windows 10 App This function is now available for the Windows Phone applications.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
Universal Windows 10 App This function is now available for the Windows Phone applications.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Browser code This function is now available in Browser code.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Browser code This function is now available in Browser code.
iPhone/iPad This function is now available for the iPhone/iPad applications.
WEBDEV - Browser code This function is now available in Browser code.
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
// Swaps the current row and row 5
LooperMoveLine(LOOP_Looper1, rowSelected , 5, amSwap)
// Moves the current row to row 3
LooperMoveLine(LOOP_Looper1, rowSelected, 3, amMove)
// Swaps 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 ..Occurrence 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 ..Occurrence for example). A fatal error occurs if this parameter is not valid.
To handle the row that is 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:
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 ..Occurrence 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 to the top.
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 the Browser Looper controls only.
WEBDEV - Server codePHP This function is available for the Ajax Looper controls, the Classic Looper controls and the linear Looper controls.
WINDEVReports and QueriesAndroidWindows MobileUniversal Windows 10 AppJavaUser code (UMC)

Multi-selection looper

If LooperMoveLine is used on a multi-selection Looper control:
  • when moving a row (amMove constant): all the selected rows will be moved.
  • when swapping rows (amSwap constant): only the first row will be swapped.
  • the rowSelected constant cannot be used. Otherwise, a fatal error occurs and no row is moved.

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.
Components
WINDEVReports and Queries wd230obj.dll
WEBDEV - Server code wd230page.dll
Windows Mobile wp230obj.dll
WEBDEV - Browser code WDJS.DLL
Java wd230java.jar
Linux wd230obj.so
Android wd230android.jar
Minimum required version
  • Version 14
This page is also available for…
Comments
Click [Add] to post a comment