Javascript: TXTextControl.HorizontalAlignment Enumeration
Description
Specifies the horizontal alignment of a text.
Members
| Member | Description |
|---|---|
| Left | Text is aligned at the left. |
| Right | Text is aligned at the right. |
| Center | Text is aligned at the center. |
| Justify | Text is justified. |
Examples
The following example uses TXTextControl.HorizontalAlignment.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 applyHorizontalAlignment(frameBase) {
frameBase.setAlignment(
TXTextControl.HorizontalAlignment.Center,
function() {
console.log("set alignment completed.");
},
onTxError
);
}