Umut Şeker
asked on
Bold or italic charecter in RichTextBox or RTF
I have a RichTextBox. I'm assigning the Text like;
....
myRichTextBox.Text =
"Welcome," + Session["Name"] + Environment.NewLine
+ "Your Age is " + Session["Age"];
....
Everything is ok. The Text shown as;
Welcome, Kosturdur
Your Age is 30
But how can I make the words "Kosturdur" and "30" bold or colored while assigning the value. I know that it's impossibe to do it with Text property so I have to use RTF property of RichTextBox
(RichTextBox.RTF =....).
The problem is I don't know can I do it. I tried but couldn't successed.
Thanks,
....
myRichTextBox.Text =
"Welcome," + Session["Name"] + Environment.NewLine
+ "Your Age is " + Session["Age"];
....
Everything is ok. The Text shown as;
Welcome, Kosturdur
Your Age is 30
But how can I make the words "Kosturdur" and "30" bold or colored while assigning the value. I know that it's impossibe to do it with Text property so I have to use RTF property of RichTextBox
(RichTextBox.RTF =....).
The problem is I don't know can I do it. I tried but couldn't successed.
Thanks,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it works great