RichTextBox.Rtf Property


Gets or sets the text of the RichTextBox control, including all rich text format (RTF) codes.

 property System::String ^ Rtf { System::String ^ get(); void set(System::String ^ value); };
public string Rtf { get; set; }
member this.Rtf : string with get, set
Public Property Rtf As String

Property Value

The text of the control in RTF format.



You can use this property to place RTF formatted text into the control for display or to extract the text of the control with the specified RTF formatting defined in the text of the control. This property is typically used when you are assigning RTF text from another RTF source, such as Microsoft Word or Windows WordPad, to the control.

If you change the RightToLeft property at run time, only raw text without formatting is preserved.

For the RTF codes, see "rich text format (RTF) Specification, version 1.6" in the MSDN library at

Applies to

See also