# Alignment Property

> Sets the paragraph alignment of text in TXTextControl: left, right, centered or justified, with value 4 returned for mixed alignments in a selection.

- **Product:** TX Text Control ActiveX
- **Section:** Documentation
- **Kind:** Property
- **Path:** TX Text Control ActiveX > API Reference > TXTextControl > Alignment Property
- **236 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/alignment-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/alignment-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/alignment-property/llms-full.txt

---

Specifies the alignment of text in a Text Control.

### Syntax

```vbscript
TXTextControl.Alignment [= value]
```

| Setting | Description |
|---|---|
| 0 | (Default) Text is left-aligned. |
| 1 | Text is right-aligned. |
| 2 | Text is centered. |
| 3 | Text is justified. |
| 4 | This value cannot be assigned to the property. Its purpose is to indicate that the selected text contains paragraphs which have different types of alignment. |

### Data Types

Integer.

### Remarks

If the [FormatSelection](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formatselection-property/llms-full.txt) property has previously been set to True, changing the Alignment property affects only the currently selected paragraph. If [FormatSelection](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/formatselection-property/llms-full.txt) has been set to False the setting applies to the entire control, in which case a value of 4 does not occur.

### See Also

- [Programming Category: Paragraph Formatting](https://docs.textcontrol.com/tx-text-control-activex/reference/categories/paragraph-formatting/llms-full.txt)

---

## Nearby

- **Previous:** [TXTextControl Control](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/llms-full.txt)
- **Next:** [AllowDrag Property](https://docs.textcontrol.com/tx-text-control-activex/reference/txtextcontrol/allowdrag-property/llms-full.txt)
