|
|
|
|
|
- Equivalence
- Value of the selected element
- Miscellaneous
ListSelect (Function) In french: ListeSelect Returns the index of the selected element in a List Box, ListView or Combo Box control. Reminder: The element selected corresponds to the current element on which selection bar 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.
ResIndiceElément = ListSelect(LISTE_ListeClient)
i is int = 1
IndiceLigneSelectionnee is int
IndiceLigneSelectionnee = ListSelect(LISTE_Liste1, 1)
WHILE IndiceLigneSelectionnee <> -1
Trace("La ligne n°" + IndiceLigneSelectionnee + " est sélectionnée")
i++
IndiceLigneSelectionnee = ListSelect(LISTE_Liste1, i)
END
Syntax
<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.
<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.. Remarks Equivalence The following syntaxes are equivalent: Indice est un entier Indice = <Champ Liste> and
Indice = ListeSelect(<Champ Liste>) Value of the selected element To retrieve the value of the selected element, the syntax is:
Indice est un entier Indice = ListeSelect(<Champ Liste>) <Valeur de l'élément> = <Champ Liste>[Indice] and <Valeur de l'élément> = <Champ Liste>[<Champ Liste>] 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.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|