PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
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
Selects one or more elements in a List Box, ListView or Combo Box control.
The element is selected but it is not displayed if it is not visible. To make the selected element visible, use <List Box>.Position.
Reminder: The selected element corresponds to the current element onto which the selection bar is displayed.
Remark: <List Box>.SelectPlus can be used on:
  • List Box controls based on a data file or populated programmatically,
  • single-selection or multi-selection List Box controls.
Example
// Select the element at index 7 in "LIST_CustomerList"
LIST_CustomerList.SelectPlus(7)
Syntax
<List Box control>.SelectPlus([<Index 1> [... [, <Index N>]]])
<List Box control>: Control name
Name of List Box (or Combo Box) control to use.
<Index 1>: Optional integers
Index of the first element to be selected.
If no index is specified, all the elements in the specified List Box or Combo Box control are selected.
<List Box>.SelectPlus has no effect if these parameters correspond to elements that are already selected.
<Index N>: Optional integer
Index of the Nth element to be selected.
If no index is specified, all the elements in the specified List Box or Combo Box control are selected.
<List Box>.SelectPlus has no effect if these parameters correspond to elements that are already selected.
Remarks

Last element

To position on the last element of List Box control, use the following syntax:
<List Box control>.SelectPlus(<List Box control>.Count)
or
<List Box control> = <List Box control>.Count

Equivalence

For a single-selection List Box control without calling gStoredValue, the two following syntaxes are equivalent:
<List Box control>.SelectPlus(<Index>)
and
<List Box control> = <Index>

Miscellaneous

  • To select an element in a Table control, use <Table>.SelectPlus.
  • <List Box>.SelectPlus can be used on a "Combo Box" table column.
  • <List Box>.SelectMinus allows you to deselect the elements of a List Box or Combo Box control.
WEBDEV - Server codeWEBDEV - Browser codeAjax

Selecting an element in a List Box control that belongs to a Looper control

To select an element in a List Box control included in a Looper control, you must:
  1. Declare an attribute of the Looper control on the value of List Box control.
  2. In the code of a button (for example), specify the new attribute value for the requested row.
For example, if the attribute is ATT_SELECTROW, the following code will be used to select the 3rd element of List Box control in the 4th row:
ATT_SELECTROW[4] = 3
This code can be used in server code and in browser code.
Component: wd280obj.dll
Minimum version required
  • Version 23
This page is also available for…
Comments
Click [Add] to post a comment