SetAlignment

Description

Sets the alignment of the selected paragraphs in a RichTextEdit control.

Applies to

RichTextEdit controls

Syntax

rtename.SetAlignment ( align )

Argument

Description

rtename

The name of the RichTextEdit control in which you want to set the alignment of selected paragraphs.

align

A value of the Alignment enumerated datatype specifying how to align the paragraphs. Values are:

  • Left! -- Align each line at the left margin

  • Right! -- Align each line at the right margin

  • Center! -- Center the text between the left and right margins

  • Justify! -- Justify the paragraphs


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs.

Examples

This example sets the alignment of the selected paragraphs in the RichTextEdit control rte_1:

integer li_success
li_success = rte_1.SetAlignment(Right!)

See also

GetAlignment

GetSpacing

GetTextStyle

SetSpacing

SetTextStyle