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

</div>

# ListBox.CellAlignment

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

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `DesktopListBox.CellAlignmentAt<desktoplistbox.cellalignmentat>` as a replacement.

</div>

## Description

Aligns the specified cell. *Row* and *Column* are zero-based.

## Notes

You specify the alignment via ListBox class constants. They are:

| Class Constant | Description                            |
|----------------|----------------------------------------|
| AlignDefault   | Default alignment, same as column type |
| AlignLeft      | Left aligned                           |
| AlignCenter    | Center aligned                         |
| AlignRight     | Right aligned                          |
| AlignDecimal   | Decimal aligned                        |

## Sample code

Decimal aligns the decimal separator to the right edge of the cell. You need to use `CellAlignmentOffsetAt<listbox.cellalignmentoffsetat>` or `ColumnAlignmentOffsetAt<listbox.columnalignmentoffsetat>` to move the data into the column.

``` xojo
Listbox1.CellAlignment(1,1) = ListBox.AlignRight
```

## Compatibility

All projects types on all supported operating systems.

## See also

`ListBox</api/deprecated/listbox>` parent class; `CellAlignmentOffsetAt<listbox.cellalignmentoffsetat>`, `ColumnAlignmentOffsetAt<listbox.columnalignmentoffsetat>`.
