Is there a way to store all of the information about the text in a richtextbox
(colors, sizes, fonts, etc) and reconstruct it in another richtextbox
, which is not in the same form or project?
For example, I have a richtextbox which its text contains multiple fonts and colors, and some lines are centered, and I want to reconstruct it in another richtextbox.
I added that the new richtextbox is not in the same project, so i need to restore the information somewhere (for example, even in a string or a file).
To copy the text and formatting from one richTextBox to another, simply use:
richtextBox2.Rtf = richtextBox1.Rtf;
The Rtf property is simply a string, so you can do with it whatever you can do with strings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With