PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Last element
  • Equivalence
  • Miscellaneous
  • Selecting an element in a List Box control that belongs to a Looper control
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Selects one or more elements in a List Box (or ListView) control or in a Combo Box control.
The element is selected but it is not displayed if it is not visible. To make the selected element visible, use ListPosition.
Reminder: The selected element corresponds to the current element onto which the selection bar is displayed.
Note: ListSelectPlus can be used on:
  • the browsing or memory List Box controls,
  • single-selection or multiselection Looper controls.
Versions 16 and later
Linux This function is now available for WINDEV applications in Linux.
New in version 16
Linux This function is now available for WINDEV applications in Linux.
Linux This function is now available for WINDEV applications in Linux.
Example
// Select the element found at subscript 7 in "LIST_CustomerList"
ListSelectPlus(LIST_CustomerList, 7)
Syntax
ListSelectPlus(<List Box control> [, <Subscript 1> [... [, <Subscript N>]]])
<List Box control>: Control name
Name of List Box (or Combo Box) control to use.
If this parameter corresponds to an empty string (""), the element specified by its subscript is selected in the List Box control (or Combo Box) to which the current event belongs.
WEBDEV - Browser code The name of the List Box (or Combo Box) control to use must be specified.
<Subscript 1>: Optional integers
Subscript of first element to select.
If no subscript is specified, all the elements found in the specified List Box or Combo Box control are selected.
ListSelectPlus has no effect if these parameters correspond to elements that are already selected.
<Subscript N>: Optional integer
Subscript of Nth element to select.
If no subscript is specified, all the elements found in the specified List Box or Combo Box control are selected.
ListSelectPlus 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:
ListSelectPlus(<List Box control>, <List Box control>..Count)
or
<List Box control> = <List Box control>..Count
or
<List Box control> = ListCount(<List Box control>)

Equivalence

For a single-selection List Box control without calling gLink, the two following syntaxes are equivalent:
ListSelectPlus(<List Box control>, <Subscript>)
and
<List Box control> = <Subscript>

Miscellaneous

  • To select an element in a Table control, use TableSelectPlus.
  • ListSelectPlus can be used on a "Combo Box" table column.
  • ListSelectMinus 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 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 : wd250obj.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
How to change the display of contents of a combobox before opening the screen?
How to change the display of contents of a combobox before opening the screen?

Simple, take the following steps:

a) Click with the right mouse in the Table grid of the screen or Looper and click on the option CODE

b) find the EMBED CODE = "Displaying a Row of Tablegrid" and add this line of code

TableGrid_ControlItems [TableGrid_ControlItens] .COL_Status.COMBO_Status = 3

So the combo control that is in a container inside the table will change the displayed value of the combo, in my case I put 3 but could be a hidden table column, being a great POG strategy, and in the same place in "Displaying a Row of Tablegrid "put the following code:

TableGrid_ControlItems [TableGrid_ControlItens] .COL_Status.COMBO_Status = TableGrid_ControlItems [TableGrid_ControlItens] .COL_StatusHide

THAT SIMPLE!!!!

Any questions please contact us!

Good studies !!!!
BOLLER
15 May 2019
Control Combo in Container Looper/Table
Como alterar a exibição do conteúdo de um combobox antes de abrir a tela?

Simples, faça os seguintes passos:

a) Click com o direito do mouse na Table grid da tela ou no Looper e click na opção CODE

b) localize o EMBED CODE = "Displaying a Row of Tablegrid" e adicione essa linha de codigo

TableGrid_ControlItens[TableGrid_ControlItens].COL_Status.COMBO_Status = 3

Assim o controle combo que está num container dentro do table vai mudar o valor exibido da combo, no meu caso coloquei 3 mas poderia ser uma coluna oculta do Table, sendo uma ótima estratégia POG, e no mesmo local em "Displaying a Row of Tablegrid" coloque o seguinte código:

TableGrid_ControlItens[TableGrid_ControlItens].COL_Status.COMBO_Status = TableGrid_ControlItens[TableGrid_ControlItens].COL_StatusHide

SIMPLES ASSIM!!!!

Qualquer dúvida entre em contato!

Bons estudos!!!!
BOLLER
15 May 2019