<div class="meta" robots="noindex">

</div>

Class

# ListBoxRow

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2021r3. Please use `DesktopListBoxRow</api/user_interface/desktop/desktoplistboxrow>` as a replacement.

</div>

## Description

A class used to iterator (and read the values of) the rows of a `ListBox</api/deprecated/listbox>`.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                            | Type                               | Read-Only | Shared |
|---------------------------------|------------------------------------|-----------|--------|
| `Selected<listboxrow.selected>` | `Boolean</api/data_types/boolean>` | ✓         |        |
| `Tag<listboxrow.tag>`           | `Variant</api/data_types/variant>` | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                      | Parameters                                    | Returns                            | Shared |
|-------------------------------------------|-----------------------------------------------|------------------------------------|--------|
| `Columns<listboxrow.columns>`             |                                               | `Iterable</api/language/iterable>` |        |
| `ColumnTagAt<listboxrow.columntagat>`     | columns As `Integer</api/data_types/integer>` |                                    |        |
| `ColumnTypeAt<listboxrow.columntypeat>`   | column As `Integer</api/data_types/integer>`  |                                    |        |
| `ColumnValueAt<listboxrow.columnvalueat>` | column As `Integer</api/data_types/integer>`  |                                    |        |

## Property descriptions

<div id="listboxrow.selected">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

ListBoxRow.Selected

**Selected** As `Boolean</api/data_types/boolean>`

Gets the selection status of the current row.

This property is read-only.

Selected is `True</api/language/true>` if the row passed is selected. This property can be used to determine if the row is selected. For example,

``` xojo
Var rowsSelected As Integer
For Each row As ListBoxRow In ListBox.Rows
  If row.Selected Then rowsSelected = rowsSelected + 1
Next
```

If you allow the `ListBox</api/deprecated/listbox>` to have multiple items selected (see `ListBox.RowSelectionType<listbox.rowselectiontype>`), you may want to establish a list of all the rows selected. The following example shows how to achieve that. The `ListBox</api/deprecated/listbox>` is named *ListBox1*.

``` xojo
Var selectedRows() As ListBoxRow ' Will hold the selected rows

For Each row As ListBoxRow In ListBox1.Rows
  If row.Selected Then
    selectedRows.AddRow(row)
  End If
Next
```

<div id="listboxrow.tag">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

ListBoxRow.Tag

**Tag** As `Variant</api/data_types/variant>`

Gets the tag of the current row.

This property is read-only.

This example places all the rows in the ListBox named "LineItems" with a Tag value of "taxable" into an array:

``` xojo
Var taxableLineItems() As ListBoxRow
For Each row As ListBoxRow in LineItems.Rows
  If row.Tag = "Taxable" Then
    taxableLineItems.AddRow(row)
  End If
Next
```

## Method descriptions

<div id="listboxrow.columns">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

ListBoxRow.Columns

**Columns** As `Iterable</api/language/iterable>`

Returns a `ListBoxColumn</api/deprecated/listboxcolumn>` which can be used to iterate through the columns of a <span class="title-ref">ListBoxRow</span>.

The following example iterates through all the rows of ListBox1 adding any rows where any column is blank to the rowsWithMissingValues array:

``` xojo
Var rowsWithMissingValues() As ListBoxRow
For Each row as ListBoxRow In ListBox1.Rows
  For Each column As ListBoxColumn In row.Columns
    If column.Value = "" Then
      rowsWithMissingValues.AddRow(row)
      Exit
    End If
  Next
Next
```

<div id="listboxrow.columntagat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

ListBoxRow.ColumnTagAt

**ColumnTagAt**(columns As `Integer</api/data_types/integer>`)

Gets the ColumnTag for a column (whose index was passed) from a <span class="title-ref">ListBoxRow</span>.

In this example, *row* is a \`ListBoxRow\`:

``` xojo
Var taxable As Boolean
If row.ColumnTagAt(4) = "Taxable" Then taxable = True
```

<div id="listboxrow.columntypeat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

ListBoxRow.ColumnTypeAt

**ColumnTypeAt**(column As `Integer</api/data_types/integer>`)

Gets the Type of the column (whose index is passed) from a <span class="title-ref">ListBoxRow</span>.

In this example, *row* is a \`ListBoxRow\`:

``` xojo
Var theType As ListBox.CellTypes
theType = row.ColumnTypeAt(4)
```

<div id="listboxrow.columnvalueat">

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

</div>

<div class="rst-class">

forsearch

</div>

ListBoxRow.ColumnValueAt

**ColumnValueAt**(column As `Integer</api/data_types/integer>`)

Gets the Value of the column (whose index is passed) from a <span class="title-ref">ListBoxRow</span>.

In this example, *row* is a \`ListBoxRow\`:

``` xojo
If row.ColumnValueAt(4) = "Taxable" Then
  MessageBox("This transaction is taxable.")
End If
```

## Compatibility

All project types on all supported operating systems.

## See also

`Object</api/data_types/additional_types/object>` parent class; `ListBox</api/deprecated/listbox>`, `ListBoxColumn</api/deprecated/listboxcolumn>` classes
