Link to home
Start Free TrialLog in
Avatar of Umut Şeker
Umut ŞekerFlag for Türkiye

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,
ASKER CERTIFIED SOLUTION
Avatar of Wayne Taylor (webtubbs)
Wayne Taylor (webtubbs)
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Umut Şeker

ASKER

Thanks webtubbs,
it works great