- May 7, 2013
- 10,400
The button simply adds to the text box.
I was thinking of adding this:
If the user has selected some text, then I would like the program to wrap the selected text with the two B's.
Thanks for any help :)
Code:
private void Bold_Click(object sender, EventArgs e)
{
richTextBox1.AppendText("");
}
I was thinking of adding this:
Code:
private void Bold_Click(object sender, EventArgs e)
{
if (richTextBox1.SelectedText != "")
{
richTextBox1.AppendText(""); <-- My question is for this bit
}
else
{
richTextBox1.AppendText("");
}
}
If the user has selected some text, then I would like the program to wrap the selected text with the two B's.
Thanks for any help :)