ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

This content has been translated automatically.  Click here  to view the French version.
Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
  • Single-selection and multi-selection List Box control
  • Limits
WINDEV
WindowsLinuxJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac Catalyst
Others
Stored procedures
The property Selected property allows you to:
  • WINDEV Select, or determine if a row is selected in a List, ListView or Table control.
    Remark: Unlike the ListSelect function, this property lets you know directly whether the line with the specified index is selected or not.
  • WINDEV Select, or determine if a column or cell is selected in a Table control with row or column selection.
Example
WINDEVJava
// Sélectionne la ligne 5 du champ Liste VILLE
LISTE_Ville[5].Sélectionnée = True
Syntax
WINDEVJava

Determining if an element is selected Hide the details

<Result> = <Control used>[<Row index>].Selected
<Result>: Boolean
  • True if the item is selected,
  • False otherwise.
<Control used>: Control name
Name of the field to be manipulated:
  • List, Image list or Table field name: indicates whether the line is selected.
  • WINDEV Column name: shows whether the cell is selected. If the row index is not specified, allows you to determine whether the column is selected.
<Row index>: Integer
Index of the row to use.
WINDEVJava

Selecting an element Hide the details

<Control used>[<Row index>].Selected = <Selection>
<Control used>: Control name
Name of the field to be manipulated:
  • List, Image list or Table field name: selects or deselects a line.
  • WINDEV Column name: to select or deselect a cell. If the row index is not specified, enables you to select or deselect the table column.
<Row index>: Integer
Index of the row to use.
<Selection>: Boolean
  • True if the element must be selected,
  • False otherwise.
Remarks
WINDEVJava

Single-selection and multi-selection List Box control

In multi-selection List Box controls, the Selected property is used to:
  • find out the selected rows.
  • select several rows.
In single-selection List Box controls, when a row is selected with the Selected property, the previously selected row is automatically deselected.
WINDEVJava

Limits

The Selected property applies only to:
  • Table controls.
  • List Box controls.
  • ListView controls.
  • Table columns.
  • Table cells.
Java The Selected property applies only to List Box controls.
Minimum version required
  • Version 9
This page is also available for…
Comments
Pegar ID
Prezados

Para pegar um registro id de um browser table grid tem 2 formas:

Crie uma var global da janela:
GNID is 8-byte int = 0


A) Em Code evento
SELECT ROW

GNID = TableNameGrid.COL_myID



B) Em Code evento
SELECT ROW

Nx is int = Tableinfoxy(TableNameGrid, tiLineNumber, MouseXPos(), MouseYPos())

If nx > 0

GNID = TableNameGrid[nx].COL_myID

End
Boller
16 Apr. 2024

Last update: 05/10/2025

Send a report | Local help