CellAlignment

This property returns and sets a value that determines the alignment of data in a cell or range of selected cells.

Syntax

object.CellAlignment [= value]

Parameters

object
Object expression that evaluates to a Grid control.
value
Integer that specifies how text should be aligned within cells. The following table shows the settings for value.
Constant
Setting
Description
flexAlignCustom –1 Custom
flexAlignLeftTop 0 Left top
flexAlignLeftCenter 1 Left center (default for strings)
flexAlignLeftBottom 2 Left bottom
flexAlignCenterTop 3 Center top
flexAlignCenterCenter 4 Center center
flexAlignCenterBottom 5 Center bottom
flexAlignRightTop 6 Right top
flexAlignRightCenter 7 Right center (default for numbers)
flexAlignRightBottom 8 Right bottom
flexAlignGeneral 9 General: left center for strings; right center for numbers

Remarks

The CellAlignment property is unavailable at design time.