Visual Basic: RichTextBox Control

MultiLine Property (RichTextBox Control)

See Also    Example    Applies To

Returns or sets a value indicating whether a RichTextBox control can accept and display multiple lines of text. Read-only at run time.

Syntax

object**.MultiLine**

The object placeholder represents an object expression that evaluates to a RichTextBox control.

Settings

The MultiLine property settings are:

Setting Description
True Allows multiple lines of text.
False (Default) Ignores carriage returns and restricts data to a single line.

Remarks

A multiple-line RichTextBox control wraps text as the user types text extending beyond the text box.

You can also add scroll bars to a larger RichTextBox control using the ScrollBars property. If no HScrollBar control (horizontal scroll bar) is specified, the text in a multiple-line RichTextBox automatically wraps.

Note   On a form with no default button, pressing ENTER in a multiple-line RichTextBox control moves the focus to the next line. If a default button exists, you must press CTRL+ENTER to move to the next line.