Append rtf content to a richtextbox

F

Fab

Hi,

I have a two richtextbox with rtf content.
I just want to add the content of the 2 richtextbox into a third one.

When I use the code below, the richTextBox3 remains empty.
richTextBox3.Rtf += richTextBox1.Rtf;
richTextBox3.Rtf += richTextBox2.Rtf;

And of course i can't use richTextBox3.AppendText because i need to keep the
formaated text of richTextBox1 and richTextBox2.

Is there any solution ?!

Thanks !
 
J

Jim

Try this:

richTextBox1.SelectAll();
richTextBox1.Copy();
richTextBox3.Paste();

richTextBox2.SelectAll();
richTextBox2.Copy();
richTextBox3.Paste();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top