• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 275
  • Last Modified:

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
0
directxBOB
Asked:
directxBOB
  • 4
  • 3
1 Solution
 
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
 
Bob LearnedCommented:
Are you looking for a TextBox control with Save and SaveAs capability?

Bob
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now