Reply to thread

The button simply adds  to the text box.


[code]private void Bold_Click(object sender, EventArgs e)

        {

            richTextBox1.AppendText("");

        }[/code]


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("");

            }


        }[/code]


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 :)


Back
Top