Back to Devexpress

TableContentHorizontalAlignment Enum

aspnetcore-js-devexpress-dot-richedit-6a373cc6.md

latest1.6 KB
Original Source

TableContentHorizontalAlignment Enum

List the horizontal alignment options for table content.

Declaration

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

Members

NameDescription
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:

js
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;