PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Equivalence
  • Miscellaneous
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the index of the selected element in a List Box (or ListView) control or in a Combo Box control.
Reminder: The selected element corresponds to the current element onto which the selection bar is displayed.
Remark: <List Box>.Select can be used on:
  • the browsing or memory List Box controls,
  • single-selection or multi-selection Looper controls.
Example
// Subscript of selected element in "LIST_CustomerList"
ResElementSubscript = LIST_CustomerList.Select()
// Rows selected in a multi-selection List Box control
i is int = 1
SelectedRowSubscript is int
SubscriptSelectedRow = LIST_List1.Select(1)
WHILE SelectedRowSubscript <> -1
Trace("Row #" + SelectedRowSubscript + " is selected")
i++
SubscriptSelectedRow = LIST_List1.Select(i)
END
 
// Equivalent to:
// FOR EACH SELECTED ROW OF LIST_List1
// Trace("Row #" + LIST_List1 + " is selected")
// END
Syntax
<Result> = <List Box control>.Select([<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.
<Rank>: Optional integer
Rank of selection for a multi-selection List Box control. If this parameter is not specified, the subscript of first selected element is returned.
For example: To retrieve the first selected element, the rank will be 1, to retrieve the second selected element, the rank will be 2, etc.
Remarks

Equivalence

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

Miscellaneous

  • To find out the subscript of selected element in a Table control, use TableSelect.
  • <List Box>.Select can be used on a "Combo Box" table column.
Component: wd270obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment