ComponentOne True DBGrid Pro 8
Horizontal and Vertical Alignment

Use the Alignment property of the Column object to control the horizontal placement of cell text within a column. The allowable values for this property are as follows:

0 - Left

1 - Right

2 - Center

3 - General

The setting 3 - General, which is the default for data cells, indicates that the alignment should be based upon the underlying data type. For example, strings are left-aligned, while numbers are right-aligned.

Use the VerticalAlignment member of the Style property to control the vertical placement of text within the cells of a grid, split, or column. The allowable values for this property are as follows:

0 - Top

1 - Bottom

2 - Vertical Center

For data cells, the default value is 0 - Top. For static grid elements such as caption bars, column headers, and column footers, the default value is 2 - Vertical Center. See the section Named style defaults to learn how the default values are derived.

The following grid depicts all possible combinations of the Alignment and VerticalAlignment properties (the general setting is omitted because it is ultimately rendered as left, right, or center).

The Alignment and VerticalAlignment properties are tightly integrated with the concept of styles. For more information, see How to Use Styles.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback