Save function

A

AxOn

How can I save the text from a rich text box that is generated as a new
rich text box in a tab control? I want to be able to have several rich
text boxes open, and save the one that is under the selected tab.

Thanks!
 
D

Dmytro Lapshyn [MVP]

Hi,

theRichTextBox.SaveFile(...) (if to disk)

string rtfData = theRichTextBox.Rtf; (if from one text box to another)
anotherRichTextBox.Rtf = rtfData;

Does this anser your question?
 
A

AxOn

The problem is that I for example want open several files with text in
them, and then want to save one of the files that I opened. The
saveFile() code i wrote doesnt recognize the richTextBox that is
created as I'm opening the text file, and I end up with an empty file
:( So, I guess my save function saves the empty richTextBox that i
have in the "external" class file. Can't just figure out how to do
it???

Thanks any way..
 

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