TextAlign Property

                          

Specifies how text is aligned in a control.

Syntax

object.TextAlign [= fmTextAlign]

The TextAlign property syntax has these parts:

Part Description
object Required. A valid object.
fmTextAlign Optional. How text is aligned in the control.

Settings

The settings for fmTextAlign are:

Constant Value Description
fmTextAlignLeft 1 Aligns the first character of displayed text with the left edge of the control's display or edit area (default).
fmTextAlignCenter 2 Centers the text in the control's display or edit area.
fmTextAlignRight 3 Aligns the last character of displayed text with the right edge of the control's display or edit area.

Remarks

For a ComboBox, the TextAlign property only affects the edit region; this property has no effect on the alignment of text in the list. For stand-alone labels, TextAlign determines the alignment of the label's caption.