SetParagraphSetting

Description

Sets the size of the indentation, left margin, or right margin of the paragraph containing the insertion point in a RichTextEdit control.

Applies to

RichTextEdit controls

Syntax

rtecontrol.SetParagraphSetting ( whichsetting, value )

Argument

Description

rtecontrol

The name of the control for which you want paragraph information.

whichsetting

A value of the ParagraphSetting enumerated datatype specifying the setting you want to change. Values are:

  • Indent! -- Returns the indentation of the paragraph

  • LeftMargin! -- Returns the left margin of the paragraph

  • RightMargin! -- Returns the right margin of the paragraph

value

A long whose value is the width of the margin or indent in units of 1000ths of an inch. For example, a value of 500 specifies a width of half an inch.


Return value

Integer.

Returns 1 if it succeeds and -1 if an error occurs. If any argument is null, it returns null.

Usage

Each paragraph has indentation, left margin, and right margin settings. To set all three for the current paragraph, call SetParagraphSetting three times.

Examples

This example sets the indentation setting for the current paragraph to a quarter inch:

ll_indent = rte_1.SetParagraphSetting(Indent!, 250)

This example sets the left margin for the current paragraph to an inch:

rte_1.SetParagraphSetting(LeftMargin!, 1000)

See also

GetParagraphSetting

SetAlignment

SetSpacing

SetTextColor

SetTextStyle