alignment [Text]
Positions text in a Text object.
Property of
Text
Description
The Text object’s alignment property is maintained primarily for compatibility. It is an enumerated property that can have the following values:
Setting |
Description |
0 (Top Left) |
Adjacent to the top edge and the left edge |
1 (Top Center) |
Adjacent to the top edge and centered horizontally |
2 (Top Right) |
Adjacent to the top edge and the right edge |
3 (Center Left) |
Centered vertically and adjacent to left edge |
4 (Center) |
Centered horizontally and vertically |
5 (Center Right) |
Centered vertically and adjacent to right edge |
6 (Bottom Left) |
Adjacent to the bottom edge and the left edge |
7 (Bottom Center) |
Centered horizontally and adjacent to the bottom edge |
8 (Bottom Right) |
Adjacent to the bottom edge and the right edge |
9 (Wrap Left) |
Same as Top Left |
10 (Wrap Center) |
Same as Top Center |
11 (Wrap Right) |
Same as Top Right |
The Text object’s alignHorizontal and alignVertical properties control the alignment in the horizontal and vertical plane separately. They also include options to justify the text. When either property is set, the alignment property is also changed to match (justify becomes top or left). When the alignment property is set, the other two properties are changed to match.
Text wrapping is controlled by the wrap property.