Class

# DesktopListBoxRow

<div class="rst-class">

forsearch

</div>

Listbox

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

## Description

A class used to iterate (and read the values of) the rows of a `DesktopListBox</api/user_interface/desktop/desktoplistbox>`.

## Properties

<div class="rst-class">

table-centered_columns_3_and_4

</div>

| Name                                         | Type                               | Read-Only | Shared |
|----------------------------------------------|------------------------------------|-----------|--------|
| `ColumnCount<desktoplistboxrow.columncount>` | `Integer</api/data_types/integer>` | ✓         |        |
| `Selected<desktoplistboxrow.selected>`       | `Boolean</api/data_types/boolean>` | ✓         |        |
| `Tag<desktoplistboxrow.tag>`                 | `Variant</api/data_types/variant>` | ✓         |        |

## Methods

<div class="rst-class">

table-centered_column_4

</div>

| Name                                                         | Parameters                                                                                                    | Returns                                                      | Shared |
|--------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------|--------|
| `CellCheckBoxStateAt<desktoplistboxrow.cellcheckboxstateat>` | column As `Integer</api/data_types/integer>`                                                                  | `DesktopCheckBox.VisualStates<desktopcheckbox.visualstates>` |        |
| `CellCheckBoxValueAt<desktoplistboxrow.cellcheckboxvalueat>` | column As `Integer</api/data_types/integer>`                                                                  | `Boolean</api/data_types/boolean>`                           |        |
| `CellTagAt<desktoplistboxrow.celltagat>`                     | columns As `Integer</api/data_types/integer>`                                                                 | `Variant</api/data_types/variant>`                           |        |
| `CellTextAt<desktoplistboxrow.celltextat>`                   | column As `Integer</api/data_types/integer>`                                                                  | `String</api/data_types/string>`                             |        |
| `CellTypeAt<desktoplistboxrow.celltypeat>`                   | column As `Integer</api/data_types/integer>`                                                                  | `DesktopListBox.CellTypes<desktoplistbox.celltypes>`         |        |
| `Constructor<desktoplistboxrow.constructor0>`                | lb As `DesktopListBox</api/user_interface/desktop/desktoplistbox>`, row As `Integer</api/data_types/integer>` |                                                              |        |

## Property descriptions

<div id="desktoplistboxrow.columncount">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopListBoxRow.ColumnCount

**ColumnCount** As `Integer</api/data_types/integer>`

> Returns the number of columns in the row.
>
> This property is read-only.

<div id="desktoplistboxrow.selected">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopListBoxRow.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 DesktopListBoxRow In ListBox1.Rows
>   If row.Selected Then rowsSelected = rowsSelected + 1
> Next
> ```
>
> If you allow the `DesktopListBox</api/user_interface/desktop/desktoplistbox>` to have multiple items selected (see `RowSelectionType<desktoplistbox.rowselectiontype>`), you may want to establish a list of all the rows selected. The following example shows how to achieve that. The `DesktopListBox</api/user_interface/desktop/desktoplistbox>` is named *ListBox1*.
>
> ``` xojo
> Var selectedRows() As DesktopListBoxRow ' Will hold the selected rows
>
> For Each row As DesktopListBoxRow In ListBox1.Rows
>   If row.Selected Then
>     selectedRows.AddRow(row)
>   End If
> Next
> ```

<div id="desktoplistboxrow.tag">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopListBoxRow.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 DesktopListBox named "LineItems" with a Tag value of "taxable" into an array:
>
> ``` xojo
> Var taxableLineItems() As DesktopListBoxRow
> For Each row As DesktopListBoxRow in LineItems.Rows
>   If row.Tag = "Taxable" Then
>     taxableLineItems.AddRow(row)
>   End If
> Next
> ```

## Method descriptions

<div id="desktoplistboxrow.cellcheckboxstateat">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopListBoxRow.CellCheckBoxStateAt

**CellCheckBoxStateAt**(column As `Integer</api/data_types/integer>`) As `DesktopCheckBox.VisualStates<desktopcheckbox.visualstates>`

> Used to get or set the state of the cell at the *column* passed. This assumes that the passed cell is a CheckBox cell. Use the CellType property to set a cell to a CheckBox cell. `DesktopCheckBox.VisualStates<desktopcheckbox.visualstates>` is an Enum of the `DesktopCheckBox</api/user_interface/desktop/desktopcheckbox>` class.
>
> The CellCheckBoxStateAt method enables you to get or set the value of a tri-state Checkbox cell. Any cell of type TypeCheckbox box can store one of three values: Checked, Unchecked, and Indeterminate.
>
> To set up a cell as TypeCheckbox, use code such as this in the Opening event:
>
> ``` xojo
> Me.CellTypeAt(1, 0) = DesktopListBox.CellTypes.CheckBox
> ```
>
> To change the state of the cell, use the VisualStates enum of the DesktopCheckBox control:
>
> ``` xojo
> ListBox1.CellCheckBoxStateAt(1, 0) = DesktopCheckbox.VisualStates.Indeterminate
> ```
>
> The Indeterminate state places a minus sign in the checkbox (macOS) or filled in checkbox (Windows and Linux).

<div id="desktoplistboxrow.cellcheckboxvalueat">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopListBoxRow.CellCheckBoxValueAt

**CellCheckBoxValueAt**(column As `Integer</api/data_types/integer>`) As `Boolean</api/data_types/boolean>`

> Checks or unchecks the checkbox in the passed cell.

<div id="desktoplistboxrow.celltagat">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopListBoxRow.CellTagAt

**CellTagAt**(columns As `Integer</api/data_types/integer>`) As `Variant</api/data_types/variant>`

> Gets the CellTag for a cell (whose *column* index was passed) from a <span class="title-ref">DesktopListBoxRow</span>.
>
> In this example, *row* is a \`DesktopListBoxRow\`:
>
> ``` xojo
> Var taxable As Boolean
> If row.CellTagAt(4) = "Taxable" Then taxable = True
> ```

<div id="desktoplistboxrow.celltextat">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopListBoxRow.CellTextAt

**CellTextAt**(column As `Integer</api/data_types/integer>`) As `String</api/data_types/string>`

> Gets the text of the cell (whose *column* index is passed) from a <span class="title-ref">DesktopListBoxRow</span>.
>
> In this example, *row* is a \`DesktopListBoxRow\`:
>
> ``` xojo
> If row.CellTextAt(4) = "Taxable" Then
>   MessageBox("This transaction is taxable.")
> End If
> ```

<div id="desktoplistboxrow.celltypeat">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopListBoxRow.CellTypeAt

**CellTypeAt**(column As `Integer</api/data_types/integer>`) As `DesktopListBox.CellTypes<desktoplistbox.celltypes>`

> Gets the Type of the cell (whose *column* index is passed) from a <span class="title-ref">DesktopListBoxRow</span>.
>
> In this example, *row* is a \`DesktopListBoxRow\`:
>
> ``` xojo
> Var theType As DesktopListBox.CellTypes
> theType = row.CellTypeAt(4)
> ```

<div id="desktoplistboxrow.constructor0">

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

</div>

<div class="rst-class">

forsearch

</div>

DesktopListBoxRow.Constructor

**Constructor**(lb As `DesktopListBox</api/user_interface/desktop/desktoplistbox>`, row As `Integer</api/data_types/integer>`)

> <div class="note">
>
> <div class="title">
>
> Note
>
> </div>
>
> `Constructors</api/language/constructor>` are special methods called when you create an object with the `New</api/language/new>` keyword and pass in the parameters above.
>
> </div>
>
> Creates a new <span class="title-ref">DesktopListBoxRow</span> from the `DesktopListBox</api/user_interface/desktop/desktoplistbox>` and *row* number passed.

## Compatibility

|                       |         |
|-----------------------|---------|
| **Project Types**     | Desktop |
| **Operating Systems** | All     |

<div class="seealso">

`Object</api/data_types/additional_types/object>` parent class; `DesktopListBox</api/user_interface/desktop/desktoplistbox>` classes

</div>
