DS Server

Javascript: TXTextControl.VerticalAlignment Enumeration

Enumeration

Description

Specifies the vertical alignment of a text.

Members

MemberDescription
TopText is aligned at the top.
CenterText is aligned at the center.
BottomText is aligned at the bottom.

Examples

The following example uses TXTextControl.VerticalAlignment.Center (text is aligned at the center.) in a document-editing workflow.

function onTxError(error) {
    console.error("TX Text Control error:", error.msg);
    error.handled = true;
}

function applyVerticalAlignment(tableCellFormat) {
    tableCellFormat.setVerticalAlignment(
        TXTextControl.VerticalAlignment.Center,
        function() {
            console.log("set vertical alignment completed.");
        },
        onTxError
    );
}