please help me,
how to change Title font color blue, remaining Description and Link fonts are normal in the below code using C#.
rtb.Text += "Title: "+ rssChannel.GetString("title") + " \r\n";
rtb.Text += "Description: " + rssChannel.GetString("description") + "\r\n";
rtb.Text += "Link: " + rssChannel.GetString("link") + "\r\n";
With Warm Regards
Sujit
Phone +91 9935433006(India)
Change the font for richtextbox uxing C #
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


Jean PaulRank #32 · 38.5K reputationPosted Feb 3, 2011, 10:32 PM EST
// Set title style
rtb.SelectionColor = Color.Blue;
rtb.SelectionFont = new Font("Calibri", 12, FontStyle.Bold);
rtb.SelectedText += "Title: " + rssChannel.GetString("title") + " \r\n";
// Set remaining style
rtb.SelectionColor = Color.Black;
rtb.SelectionFont = new Font("Calibri", 10, FontStyle.Regular);
rtb.SelectedText += "Description: " + rssChannel.GetString("description") + "\r\n";
rtb.SelectionColor = Color.Black;
rtb.SelectionFont = new Font("Calibri", 10, FontStyle.Regular);
rtb.SelectedText += "Link: " + rssChannel.GetString("link") + "\r\n";