RichTextBox.Text Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the current text in the rich text box.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public override string Text { get; set; }

Property Value

Type: System.String

The text displayed in the control.

To display multiple lines of text in a RichTextBox, set the Multiline property to true. To read or set the text of a multiline text box, use the Lines property. The Text property does not return any information about the formatting applied to the contents of the RichTextBox. To get the rich text formatting (RTF) codes, use the Rtf property. The amount of text that can be entered in the RichTextBox control is limited only by available system memory.

.NET Framework
Available since 1.1
Return to top
Show: