AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Controles, páginas y ventanas / Funciones Looper
  • Use conditions
  • Multi-selection Looper
  • Handling errors
WINDEV
WindowsLinuxJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac Catalyst
Otros
Procedimientos almacenados
Moves a row or swaps two rows in a Looper control.
Ejemplo
// Echange la répétition en cours et la répétition 5
ZR_ZoneRépétée1.DéplaceLigne(rowSelected, 5, amSwap)
// Déplace la répétition en cours à la répétition 3
ZR_ZoneRépétée1.DéplaceLigne(rowSelected, 3, amMove)
// Echange la ligne en cours avec la ligne suivante
ZR_ZoneRépétée1.DéplaceLigne(rowSelected, amNext, amSwap)
Sintaxis

Mover a una posición específica Ocultar los detalles

<Result> = <Looper control>.MoveLine(<Index of row to move> , <Destination row index> [, <Operation to perform>])
<Result>: Integro
New index of the row that was moved.
<Looper control>: Nombre del control
Name of the Looper control to be used.
<Index of row to move>: Integro
Position of the row to move. This position must be included between 1 and the number of rows found in the control (returned by <Looper>.Count or Count for example).
To move the row that is currently selected, use the rowSelected constant.
<Destination row index>: Integro
New row position. This position must be included between 1 and the number of rows found in the control (returned by <Looper>.Count 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>: Constante o combinación de constantes de tipo Integer (opcional)
Change of row position:
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) 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.
amSwapThe source row and the destination row are swapped.

Desplazamiento relativo a la posición actual Ocultar los detalles

<Result> = <Looper control>.MoveLine(<Index of row to move> , <Relative move> [, <Operation to perform>])
<Result>: Integro
New index of the row that was moved.
<Looper control>: Nombre del control
Name of the Looper control to be used.
<Index of row to move>: Integro
Position of the row to move. This position must be included between 1 and the number of rows found in the control (returned by <Looper>.Count or Count for example).
To move the row that is currently selected, use the rowSelected constant.
<Relative move>: Constante de tipo Integer
Used to move or a swap to a position relative to the index of the row to move.
amFirstMoves the row to first position.
amLastMoves the row to the last position.
amNextMoves the row one position to the bottom.
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.
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).

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>: Constante o combinación de constantes de tipo Integer (opcional)
Change of row position:
amDisplayDestinationThe 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.
amSwapThe source row and the destination row are swapped.
Observaciones

Use conditions

<Looper>.MoveLine can be used on:
  • a Looper control with in-memory data source,
  • a Looper control populated programmatically.
WINDEVJavaCódigo de Usuario (UMC)

Multi-selection Looper

If <Looper>.MoveLine is used on a multi-selection Looper control:
  • when moving repeats/rows (constant tdDéplace): all selected repeats/rows will be moved.
  • when exchanging rows/repeats (constant tdEchange): only the first selected row/repeat will be exchanged.
  • the rowSelected constant cannot be used. Otherwise, a fatal error occurs and no row will be moved.

Handling errors

Caution: <Looper>.MoveLine returns no error code. To determine if this function has generated an error, use ErrorInfo with the errMessage constant.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 23
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 30/09/2024

Señalar un error o enviar una sugerencia | Ayuda local