Controls that display text
For most controls that display text, the alignment property specifies the alignment of all the text in the control. Text can be centered, left aligned, or right aligned.
For RichTextEdit controls, each paragraph has its own alignment setting, including Center, Left, Right, and Justify.
To specify text alignment for controls other than RichTextEdit:
On the General page of the control’s Properties view, select an alignment from the Alignment drop-down list, or click the Left, Center, and Right alignment buttons in the StyleBar. Use the StyleBar to set the alignment for several selected objects at once.
To align text in paragraphs in RichTextEdit controls:
Select text in the paragraphs to be aligned.
Right-click on the selection to display the text object's property sheet, and select the alignment setting.
To allow alignment at runtime (RichTextEdit only):
On the Document tab page of the control’s Properties view, check either the Toolbar or the PopMenu check box.
At runtime, users select the text to align with the mouse and then right-click on the text to invoke a pop-up menu, or select an alignment button on the StyleBar.
The datatype of the Alignment property is the Alignment enumerated datatype. It has four values: Center!, Left!, and Right! apply to all controls with text; Justify! applies only to RichTextEdit controls.
For example, the following line specifies center alignment for a MultiLineEdit control:
mle_1.Alignment = Center!