Text Edit Control (Save and Save AS)

Just wondering if anyone has links to some good Text Edit source with Save and Save As functionality. Doesnt need to be extremely complex or anything Im actually just looking for save functionality and to see how its done.

Cheers
directxBOBAsked:
Who is Participating?
 
Bob LearnedCommented:
public void Save(string fileName)
{
   this.richTextBox1.SaveFile(fileName, RichTextBoxStreamType.RichText)
}

public void SaveAs()
{
   SaveFileDialog dialog = new SaveFileDialog();
   dialog.AddExtension = true;
   dialog.CheckPathExists = true;
   dialog.DefaultExt = "txt";
   dialog.Filter = "Text file (*.txt)|*.txt";
   dialog.InitialDirectory = Application.StartupPath();
   dialog.OverwritePrompt = true;
   dialog.ShowHelp = false;
   dialog.Title = "Enter Save File Name";
   dialog.ValidateNames = true;
   if (dialog.ShowDialog() == DialogResult.OK)
      this.Save(dialog.FileName);
}

Bob
0
 
Bob LearnedCommented:
What?

Bob
0
 
directxBOBAuthor Commented:
Basic Text edit code written in C#

It doesnt have to be rich text, just once it saves what the user types in and has a save as function.
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
Bob LearnedCommented:
Are you looking for a TextBox control with Save and SaveAs capability?

Bob
0
 
directxBOBAuthor Commented:
Im looking to see how they save them. I have 99% of it already done, Im just having problems with my Temp Untitled Document. Much like when you open Word a Temp Untitled Document is created until you either save it or open another.
0
 
Bob LearnedCommented:
Help me out here!!  What kinds of problems are you having?  It is very difficult to help with vague descriptions--specific descriptions would help.

Bob
0
 
directxBOBAuthor Commented:
Im looking to see how they save the text typed into a box. Thats simply it, I know there are plenty of open source C# rich text documents out there. Where you type in a whole load of text and then click a save or a save as button. All I want to see is how they handle and manage the save / save as function.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.