Javascript: TXTextControl.BarcodeAlignment Enumeration
Description
Determines the alignment of the barcode image inside the control.
Members
| Member | Description |
|---|---|
| TopLeft | Sets the alignment of the barcode to the top left of the control. |
| TopCenter | Sets the alignment of the barcode to the top center of the control. |
| TopRight | Sets the alignment of the barcode to the top right of the control. |
| MiddleLeft | Sets the alignment of the barcode to the middle left of the control. |
| MiddleCenter | Sets the alignment of the barcode to the middle center of the control. |
| MiddleRight | Sets the alignment of the barcode to the middle right of the control. |
| BottomCenter | Sets the alignment of the barcode to the bottom center of the control. |
| BottomLeft | Sets the alignment of the barcode to the bottom left of the control. |
| BottomRight | Sets the alignment of the barcode to the bottom right of the control. |
Examples
The following example uses TXTextControl.BarcodeAlignment.TopLeft (sets the alignment of the barcode to the top left of the control.) in a document-editing workflow.
function onTxError(error) {
console.error("TX Text Control error:", error.msg);
error.handled = true;
}
function applyBarcodeAlignment(barcode) {
barcode.setAlignment(
TXTextControl.BarcodeAlignment.TopLeft,
function() {
console.log("set alignment completed.");
},
onTxError
);
}