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 List Box
  • Operating mode on a Combo Box control
  • Multi-selection List Box control
  • Error management
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 List Box or Combo Box control.
Remarks:
Ejemplo
// Swap the current row and row 5
LIST_List1.MoveLine(rowSelected, 5, amSwap)
// Move the current row to row 3
LIST_List1.MoveLine(rowSelected, 3, amMove)
// Swap the current row with the next row
LIST_List1.MoveLine(rowSelected, 5, amNext, amSwap)
Sintaxis

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

<Result> = <List Box control>.MoveLine(<Index of row to move> , <Destination row index> [, <Operation to perform>])
<Result>: Integro
New index of the row that was moved.
<List Box control>: Nombre del control
Name of the List Box or Combo Box 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 List Box or Combo Box control (returned by <List Box>.Count or Occurrence 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 between 1 and the number of rows in the List Box or Combo Box control (returned by <List Box>.Count 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>: Constante o combinación de constantes de tipo Integer (opcional)
Change row position:
amDisplayDestinationThe modified row is displayed in the List Box control (or Combo Box). If necessary, the lines are dequeued automatically to display the modified line. The selected row (selection bar) does not change.
This constant can be combined with the amMove and amSwap constants.
WEBDEV - Código ServidorPHP This constant is not available.
amMove
(default value)
Moves the row to the index of the destination row.
amSwapThe source and destination rows are swapped.

Desplazamiento relativo a la posición actual Ocultar los detalles

<Result> = <List Box control>.MoveLine(<Index of row to move> , <Relative move> [, <Operation to perform>])
<Result>: Integro
  • New index of the row that was moved,
  • 0 if an error occurs.
<List Box control>: Nombre del control
Name of List Box control to use.
<Index of row to move>: Integro
Position of the row to move. This position must be included between 1 and the number of rows in the List Box control (returned by <List Box>.Count or Occurrence for example).
To handle 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 the first position.
amLastMoves the row to the last position.
amNextMoves the row one position downwards.
amNextPageMoves the row one page to the bottom (a page corresponds to the number of rows that can be simultaneously displayed in the List Box control).
WEBDEV - Código ServidorPHP This constant is not available.
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 List Box control).
WEBDEV - Código ServidorPHP This constant is not available.

If this parameter is invalid (amPrevious used on the first row of List Box 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 row position:
amDisplayDestinationThe modified row is displayed in the List Box control. If necessary, the lines are dequeued automatically to display the modified line. The selected row (selection bar) does not change.
This constant can be combined with the amMove and amSwap constants.
WEBDEV - Código ServidorPHP This constant is not available.
amMove
(default value)
Moves the row to the index of the destination row.
amSwapThe source and destination rows are swapped.
Observaciones

Operating mode on a Combo Box control

When <List Box>.MoveLine is used on a Combo Box control, the selected element remains the same. The index of the element selected in the drop-down list (i.e. the value returned by the Combo Box control) is modified.

Multi-selection List Box control

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

Error management

Caution: <List Box>.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: 21/09/2024

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