Javascript: TXTextControl.VerticalAlignment Enumeration
Description
Specifies the vertical alignment of a text.
Members
| Member | Description |
|---|---|
| Top | Text is aligned at the top. |
| Center | Text is aligned at the center. |
| Bottom | Text 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
);
}