Gets or sets the rich text content of the control.
Syntax
Visual Basic (Declaration) | |
---|
Public Property RTF As String |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As RichTextBox
Dim value As String
instance.RTF = value
value = instance.RTF
|
C# | |
---|
public string RTF {get; set;} |
Return Value
A string value. Contents of the RichTextBox control.
Example
The following example sets the contents of the RichTextBox to a formatted Rich Text string.
C# | Copy Code |
---|
this.RichTextBox1.RTF = @"{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}\viewkind4\uc1\pard\lang1033\f0\fs17 Rich Text\par }"; |
Visual Basic | Copy Code |
---|
Me.RichTextBox1.RTF = "{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}}\viewkind4\uc1\pard\lang1033\f0\fs17 Rich Text\par }" |
Remarks
See Also