ColAlignment

This property returns and sets the alignment of data in a column.

Syntax

object.ColAlignment(number) [= value]

Parameters

object
Object expression that evaluates to a Grid control.
number
Long. Number of the column in the Grid control, or –1 to set all columns at once.
value
Integer or constant that specifies the alignment of data in a column. The following table shows the settings for value.
Constant
Value
Description
flexAlignCenter 0 Left top
flexAlignLeft 1 Left center (default for strings)
flexAlignRight 2 Left bottom

Remarks

The ColAlignment property is unavailable at design time.

Any column can have an alignment that differs from other columns. This property affects all cells in the specified column, including those in fixed rows.

To set individual cell alignments, use the CellAlignment property.