Visual Basic: RichTextBox Control

SelHangingIndent, SelIndent, SelRightIndent Properties

See Also    Example    Applies To

Returns or sets the margin settings for the paragraph(s) in a RichTextBox control that either contain the current selection or are added at the current insertion point. Not available at design time.

Syntax

object.SelHangingIndent [= integer]

object.SelIndent [= integer]

object.SelRightIndent [= integer]

The SelHangingIndent, SelIndent, and SelRightIndent properties syntax has these parts:

Part Description
object An object expression that evaluates to an object in the Applies To list.
integer An integer that determines the amount of indent. These properties use the scale mode units of the Form object containing the RichTextBox control.

Remarks

For the affected paragraph(s), the SelIndent property specifies the distance between the left edge of the RichTextBox control and the left edge of the text that is selected or added. Similarly, the SelRightIndent property specifies the distance between the right edge of the RichTextBox control and the right edge of the text that is selected or added.

The SelHangingIndent property specifies the distance between the left edge of the first line of text in the selected paragraph(s) (as specified by the SelIndent property) and the left edge of subsequent lines of text in the same paragraph(s).

These properties return zero (0) if the selection spans multiple paragraphs with different margin settings.