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
  • Equivalence
  • Miscellaneous
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
Returns the index of the selected element in a List Box, ListView or Combo Box control.
Reminder The selected item corresponds to the current item on which the selection banner is displayed.
Note: The <List Box>.seleccionar function can be used on both:
  • List Box controls based on a data file or populated programmatically,
  • single-selection or multi-selection List Box controls.
PHP In this version, <List Box>.seleccionar cannot be used on multi-selection List Box controls.
Ejemplo
// Indice de l'élément sélectionné dans le champ "LISTE_ListeClient"
ResIndiceElément = LISTE_ListeClient.Select()
// Lignes sélectionnées dans un champ Liste multisélection
i is int = 1
IndiceLigneSelectionnee is int
IndiceLigneSelectionnee = LISTE_Liste1.Select(1)
WHILE IndiceLigneSelectionnee <> -1
	Trace("La ligne n°" + IndiceLigneSelectionnee + " est sélectionnée")
	i++
	IndiceLigneSelectionnee = LISTE_Liste1.Select(i)
END

// Équivalent à:
// POUR TOUTE LIGNE SELECTIONNEE DE LISTE_Liste1
//	 Trace("La ligne n°" + LISTE_Liste1 + " est sélectionnée")
// FIN
Sintaxis
<Result> = <List Box control>.Select([<Rank>])
<Result>: Integro
  • Index of the selected element in the specified List Box (or Combo Box) control,
  • -1 if no element is selected.
For a multi-selection List Box control, the rank of the selected element must be specified <Rank>).
<List Box control>: Nombre del control
Name of List Box (or Combo Box) control to use.
<Rank>: Entero opcional
Rank of selection for a multi-selection List Box control. If this parameter is not specified, the index of the first selected element is returned.
For example: To retrieve the first item selected, the rank will be 1, to retrieve the second item selected, the rank will be 2, etc.
Observaciones

Equivalence

The following syntaxes are equivalent:
Index is int
Index = <List Box control>
and
Index = <List Box control>.Select()

Miscellaneous

  • To get the index of the element selected in a Table control, use <Table>.Select.
  • <List Box>.seleccionar can be used on a "Combo Box" table column.
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