RichTextBox.Rtf 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 text of the RichTextBox control, including all rich text format (RTF) codes.

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

<BrowsableAttribute(False)>
Public Property Rtf As String

Property Value

Type: System.String

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 http://msdn.microsoft.com/library.

.NET Framework
Available since 1.1
Return to top
Show: