Alignment Property

The alignment property defines the alignment of the text string within the text's bounding rectangle.

Syntax

object.Alignment [= enumTextAlign]

Properties

The Alignment property syntax has these parts:

Part

Description

object

An object expression that evaluates to an object in the Applies To list.

EnumTextAlign

Text position.

Settings

The settings for enumTextAlign are:

Constant

Value

Description

Left

0

Align text to left of its bounding rectangle.

Center

1

Center the text.

Right

2

Align text to right of its bounding rectangle.

Remarks

Use this property to define how a Text object aligns within it's bounding rectangle. This is useful for aligning a column of numbers, or bar graph labels. For example, if you want to align the decimal points in a column of data links, you can set the alignment property to “Right alignment”. Numbers with similar precision numbers will align properly regardless of the size of the value to the left of the decimal.

This property can also be used to control the behavior of text during a scale operation. Setting the alignment to center for text in a dynamo or group keeps an equal relationship between itself and other objects.

 

Applies To