CSS //For Regular(Without Any Effect) :
Font myFont = new Font(RichTextBox1.Font, FontStyle.Regular); RichTextBox1.SelectionFont = myFont;
//For Bold Effect :
Font myFont = new Font(RichTextBox1.Font, FontStyle.Bold); RichTextBox1.SelectionFont = myFont;
//For Italic Effect :
Font myFont = new Font(RichTextBox1.Font, FontStyle.Italic); RichTextBox1.SelectionFont = myFont;
//For Underline Effect :
Font myFont = new Font(RichTextBox1.Font, FontStyle.Underline); RichTextBox1.SelectionFont = myFont;
//For Strikeout Effect :
Font myFont = new Font(RichTextBox1.Font, FontStyle.Strikeout); RichTextBox1.SelectionFont = myFont; |
Set The Font Effect To Selected Text in RichTextBox
It Will Show You That How You Can Set The Different Different Text Effect Like Bold, Italic Underline etc...


Join the conversation! Your thoughts help the community grow.