<div class="meta" robots="noindex">

</div>

Property

# Paragraph.Alignment

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

<div class="warning">

<div class="title">

Warning

</div>

This item was deprecated in version 2019r2. Please use `Paragraph.TextAlignment<paragraph.textalignment>` as a replacement.

</div>

## Description

Gets the text <span class="title-ref">Alignment</span> of the paragraph.

## Notes

You can use either the integer values or the class constants, AlignDefault, AlignLeft, AlignCenter, or AlignRight, to set or get the \`Alignment\`:

| Name         | Description        |
|--------------|--------------------|
| AlignDefault | Default alignment  |
| AlignLeft    | Left alignment     |
| AlignCenter  | Centered alignment |
| AlignRight   | Right alignment    |

To set the <span class="title-ref">Alignment</span> of a paragraph, call the ParagraphAlignment method of the `StyledText</api/text/styledtext>` class. You can use the Paragraph or the `TextField</api/deprecated/textfield>` <span class="title-ref">Alignment</span> constants to set a paragraph <span class="title-ref">Alignment</span> using the ParagraphAlignment method.

## Sample code

This is an example of a right-aligned first paragraph.

``` xojo
Dim st As New StyledText
st = TextArea1.StyledText
TextArea1.AddText("This is the appended text.")
st.Bold(0, 4) = True
st.ParagraphAlignment(0) = Paragraph.AlignRight
```

## Compatibility

All project types on all supported operating systems.
