CellAlignment Property (ModHFGrid)
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Returns or sets a value that determines the horizontal and vertical alignment of data within the current cell. This property is not available at design time.
Syntax
object.CellAlignment [=value]
The CellAlignment property syntax has these parts:
Part | Description |
---|---|
object | An object expression that evaluates to the ModHFGrid Control object. |
value | An integer or constant that specifies how text should be aligned within the current cell, as described in Settings. |
Settings
The settings for value are:
Constant | Value | Description |
---|---|---|
flexAlignLeftTop | 0 | The cell content is aligned left, top. |
flexAlignLeftCenter | 1 | Default for strings. The cell content is aligned left, center. |
flexAlignLeftBottom | 2 | The cell content is aligned left, bottom. |
flexAlignCenterTop | 3 | The cell content is aligned center, top. |
flexAlignCenterCenter | 4 | The cell content is aligned center, center. |
flexAlignCenterBottom | 5 | The cell content is aligned center, bottom. |
flexAlignRightTop | 6 | The cell content is aligned right, top. |
flexAlignRightCenter | 7 | Default for numbers. The cell content is aligned right, center. |
flexAlignRightBottom | 8 | The cell content is aligned right, bottom. |
flexAlignGeneral | 9 | The cell content is of general alignment. This is left, center for strings and right, center for numbers. |
Example
The following example sets the text alignment for each cell to left, center using the constant setting.
Sub Form1_Load ()
ModHFGrid1.CellAlignment =flexAlignLeftCenter
End Sub
See Also
CellPicture Property (ModHFGrid) | ColAlignment, ColAlignmentBand, ColAlignmentHeader Properties (ModHFGrid) | ModHFGrid Control