DesktopListBoxRow.Selected
From Xojo Documentation
Read-Only Property (As Boolean )
BooleanValue = aDesktopListBoxRow.Selected
New in 2021r3
Supported for all project types and targets.
New in 2021r3
Supported for all project types and targets.
Gets the selection status of the current row.
Notes
Selected is True if the row passed is selected. This property can be used to determine if the row is selected. For example,
Var rowsSelected As Integer
For Each row As ListBoxRow In ListBox.Rows
If row.Selected Then rowsSelected = rowsSelected + 1
Next
For Each row As ListBoxRow In ListBox.Rows
If row.Selected Then rowsSelected = rowsSelected + 1
Next
Examples
Getting the list of selected rows
If you allow the DesktopListBox to have multiple items selected (see RowSelectionType), you may want to establish a list of all the rows selected. The following example shows how to achieve that. The DesktopListBox is named ListBox1.