Solved

Text Edit Control (Save and Save AS)

Posted on 2006-06-25
7
262 Views
Last Modified: 2010-04-16
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
Comment
Question by:directxBOB
  • 4
  • 3
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16987060
What?

Bob
0
 

Author Comment

by:directxBOB
ID: 16989022
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16995231
Are you looking for a TextBox control with Save and SaveAs capability?

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

 

Author Comment

by:directxBOB
ID: 17006355
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
 
LVL 96

Expert Comment

by:Bob Learned
ID: 17008544
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
 

Author Comment

by:directxBOB
ID: 17028730
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
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 17030595
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question