Skip to main content
All docs
V24.1

TableContentHorizontalAlignment Enum

List the horizontal alignment options for table content.

Declaration

export enum TableContentHorizontalAlignment {
    Left = 0,
    Right = 1,
    Center = 2
}

Members

Name Description
Center

Center alignment.

Left

Left alignment.

Right

Right alignment.

Remarks

Use the Table.contentHorizontalAlignment property to horizontally align content in all table cells. The TableCell.contenHorizontalAlignment property allows you horizontally align content in a particular cell.

Note

A cell’s contentHorizontalAlignment property takes priority over the table’s contentHorizontalAlignment property.

The following example centers content horizontally in the entire table and aligns a particular cell’s content to the right:

const subDocument = richEdit.selection.activeSubDocument;
const table = subDocument.tables.getByIndex(0);
table.contentHorizontalAlignment = DevExpress.RichEdit.TableContentHorizontalAlignment.Center;
cell = table.rows.getByIndex(0).cells.getByIndex(0);
cell.contentHorizontalAlignment = DevExpress.RichEdit.TableContentHorizontalAlignment.Right;