0

How can I get the text that the user marked so I can bolden only the marked text instead of bolding up the whole textbox text?I don't know how to formulate my statement..

2 Answers2

1

you would be using a RichTextBox control. you need to highlight the word and make it bold.

How to make some text bold in a rich text box C#

Community
  • 1
  • 1
Ahmed ilyas
  • 5,722
  • 8
  • 44
  • 72
1
String data=TextBox1.SelectedText;

for Formatting the Text like setting the Selected Text to Bold or to Specific font you Should Use RichTextBoxControl.

Example:

richTextBox1.SelectionFont = new Font("Arial", 10, FontStyle.Bold);
Sudhakar Tillapudi
  • 25,935
  • 5
  • 37
  • 67