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
  • Value of the selected element
  • 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 ListSelect 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, ListSelect cannot be used on multi-selection List Box controls.
// Index of the selected element in "LIST_CustomerList"
ResElementIndex = ListSelect(LIST_CustomerList)
// Rows selected in a multi-selection List Box control
i is int = 1
SelectedRowIndex is int
SelectedRowIndex = ListSelect(LIST_List1, 1)
WHILE SelectedRowIndex <> -1
	Trace("Row #" + SelectedRowIndex + " is selected")
	i++
	SelectedRowIndex = ListSelect(LIST_List1, i)
END

// Equivalent to:
// FOR EACH SELECTED ROW OF LIST_List1
//	 Trace("Row #" + LIST_List1 + " is selected")
// END
Sintaxis
<Result> = ListSelect(<List Box control> [, <Rank>])
<Result>: Integer
  • 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>: Control name
Name of List Box (or Combo Box) control to use. If this parameter corresponds to an empty string (""), the index of the element selected in the List Box control (or Combo Box) to which the current event belongs is returned.
WEBDEV - Código Navegador The name of the List Box (or Combo Box) control to use must be specified.
<Rank>: Optional integer
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 = ListSelect(<List Box control>)

Value of the selected element

To retrieve the value of the selected element, the syntax is:
Index is int
Index = ListSelect(<List Box control>)
<Element value> = <List Box control>[Index]
and
<Element value> = <List Box control>[<List Box control>]

Miscellaneous

  • To get the index of the element selected in a Table control, use TableSelect.
  • ListSelect can be used on a "Combo Box" table column.
Componente: wd300obj.dll
Versión mínima requerida
  • Versión 9
Esta página también está disponible para…
Comentarios
//Capturar valores de uma List com Mutiplas Seleções
//Capturar valores de uma List com Mutiplas Seleções
Total is int = ListSelectCount(List_Clientes)
x is int
Loop(total)
x++
trace(List_Clientes[ListSelect(List_Clientes, x)])
trace(List_Clientes[ListSelect(List_Clientes, x)]..Storevalue)
trace(List_Clientes[ListSelect(List_Clientes, x)]..value)
end
BOLLER
20 05 2019

Última modificación: 28/03/2025

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