RichTextBox::Text Property

 

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:
property String^ Text {
	virtual String^ get() override;
	virtual void set(String^ value) override;
}

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: