Reputation: 61
I am trying to input a predefined string into a RichTextBox during the process of a method, e.g.:
"various words" = RichTextBox1,ToString;
How can this be done?
Upvotes: 0
Views: 375
Reputation: 50868
You need to modify the Text
property.
Example:
RichTextBox1.Text = "various words";
If you need the text to be richly formatted, you need the Rtf
property instead.
Example:
RichTextBox1.Rtf = @"{\rtf1\ansi Hello in \b bold-face \b0 .}";
Upvotes: 2