# Javascript: TXTextControl.BarcodeTextAlignment Enumeration

> Determines the alignment of the barcode text and additional text that is displayed inside the control.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Enumeration
- **Introduced:** 28.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.BarcodeTextAlignment Enumeration
- **291 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/barcodetextalignment-enumeration/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/barcodetextalignment-enumeration/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/barcodetextalignment-enumeration/llms-full.txt

---

### Description

Determines the alignment of the barcode text and additional text that is displayed inside the control.

### Members

| Member | Description |
|---|---|
| Bottom | The text is displayed below the barcode image. |
| Top | The text is displayed above the barcode image. |

### Examples

The following example uses `TXTextControl.BarcodeTextAlignment.Bottom` (the text is displayed below the barcode image.) in a document-editing workflow.

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

function applyBarcodeTextAlignment(barcode) {
    barcode.setTextAlignment(
        TXTextControl.BarcodeTextAlignment.Bottom,
        function() {
            console.log("set text alignment completed.");
        },
        onTxError
    );
}
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.barcodes Property](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/barcodes-property/llms-full.txt)
- **Next:** [TXTextControl.BarcodeType Object](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol-barcodetype/llms-full.txt)
