Rich Text Box

  • Thread starter Thread starter Karuppasamy
  • Start date Start date
K

Karuppasamy

Hi..

I am having a Rich Text Control in a Form.
Whatever Text entered into the RichText, i want to save the Text along with
Format.
I want to display the Text again with same format using the saved Text and
Format.

How to do that??

Thanks and Regards
Karuppasamy Natarajan
 
Hi,

you can use the methode SaveFile(string fileName) of the RichTextBox control
to store your text in RTF-format (where the text format is preserved) and
load it with LoadFile(string fileName).

An alternative way would be to get/set the Rtf-Property. It contains a
string representing your text and formattings.

Hope it helps,

Neno Loje
Microsoft Student Partner
University of Hamburg
 
In the future, please don't crosspost to so many groups.

You have two options. If you just want to store the formatted text in a
variable, use the RichTextBox.Rtf property. That properrty gets or sets a
string that contains the text itself, plus the formatting codes. (It looks
similar to HTML.)

If you want to save the formatted text to a file, use the SaveFile and
LoadFile methods.

Hope this helps,
Robert Jacobson
 
Hello,

[...]

Please do not x-post to as many ngs.
 

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

Back
Top