Paragraph.TextAlignment

From Xojo Documentation

Revision as of 16:08, 7 October 2019 by PLefebvre (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Property (As TextAlignments )
aParagraph.TextAlignment = newTextAlignmentsValue
or
TextAlignmentsValue = aParagraph.TextAlignment

New in 2019r2

Supported for all project types and targets.

Gets the text alignment of the paragraph.

Notes

The values of this property are set using the TextAlignments enumeration.

To set the alignment of a paragraph, call the ParagraphAlignment method of the StyledText class. You can use the Paragraph or the TextField alignment constants to set a paragraph alignment using the ParagraphAlignment method.

Sample Code

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

Var st As New StyledText
st = TextArea1.StyledText
TextArea1.AddText("This is the added text.")
st.Bold(0, 4) = True
st.Paragraph(0).TextAlignment = TextAlignments.Right