ListBox.CellAlignment Property

Syntax

CellAlignment as Integer


Parameters are row, column (Integers). The first cell is 0,0.

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

AlignDefault (0): Default alignment, same as column type

AlignLeft (1): Left

AlignCenter (2): Center

AlignRight (3): Right

AlignDecimal (4): Decimal

For example:

listbox1.CellAlignment(1,1)=ListBox.AlignRight

Decimal aligns the decimal separator to the right edge of the cell. You need to use CellAlignmentOffset or ColumnAlignmentOffset to move the data into the column.