Save function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AxOn

    #1

    Save function

    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!

  • Dmytro Lapshyn [MVP]

    #2
    Re: Save function

    Hi,

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

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

    Does this anser your question?

    "AxOn" <hannutahv@hotm ail.com> wrote in message
    news:1139437571 .032664.3650@g4 3g2000cwa.googl egroups.com...[color=blue]
    > 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!
    >[/color]


    Comment

    • AxOn

      #3
      Re: Save function

      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..

      Comment

      Working...