Answered by:
Rich Text Box in Windows Forms?

Question
-
Hi guys,
I am trying to use a Rich Text Box in my Windows forms application.I want features like Bold,Italics,Font etc.
I dragged and dropped the Rich Text Box in to Form,but i don't see that Panel or Tool bar with all these buttons.WHat i have to do to Enable that??
Any help is Appreciated....
Thanks in Advance
AnoojMonday, October 19, 2009 7:12 AM
Answers
-
Hope this helps.
http://www.codeproject.com/KB/miscctrl/richtextboxextended.aspxMonday, October 19, 2009 7:30 AM -
Hi anooj,
We can select the text the style of which needs to be modified at first. Then we need to set the SelectionFont property to set the selected text bold. This is a code snippet:
//select the text ths style of which needs to be modified richTextBox1.Select(0,10); //Set the text bold. richTextBox1.SelectionFont = new Font(richTextBox1.SelectionFont,FontStyle.Bold);
Regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.Tuesday, October 20, 2009 8:36 AM
All replies
-
Hope this helps.
http://www.codeproject.com/KB/miscctrl/richtextboxextended.aspxMonday, October 19, 2009 7:30 AM -
Hi anooj,
We can select the text the style of which needs to be modified at first. Then we need to set the SelectionFont property to set the selected text bold. This is a code snippet:
//select the text ths style of which needs to be modified richTextBox1.Select(0,10); //Set the text bold. richTextBox1.SelectionFont = new Font(richTextBox1.SelectionFont,FontStyle.Bold);
Regards,
Aland Li
Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.Tuesday, October 20, 2009 8:36 AM -
These features are not in UI yet and you should add them yourself by using some methods and properties in RichTextBox class.
- Edited by april_123456 Tuesday, May 27, 2014 2:53 AM
Wednesday, October 21, 2009 7:20 AM