Team Foundation Server Hosting
Skip Navigation Links
C# Corner Home
Forum Home
Latest 50
Unanswered
Win Prizes
All Time Leaders
Jump to CategoryExpand Jump to Category
Login 
    Welcome Guest!
 Search Forum For :  
X
 Login
Please login to submit a new post, reply and edit exiting posts, see user profiles, and access more features. If you are not a registered member, Register here.
User Id / Email:
Password:  
Forgot Password | Forgot UserName
   Home » C# Language » Load multiple text file in simple Notepad
       
Author Reply
Tanmay Sarkar
posted 194 posts
since May 28, 2010 
from India

Load multiple text file in simple Notepad

  Posted on: 28 Aug 2010       
How we load multiple text file in our simple notepad application?
We can build a simple notepad just using rich text box or text box and open, save dialog. but in single time we only open a single file. If i open "a.txt" then when i try to open "b.txt" first file will gone.

I want to try both file will be there with separate tab.(like Notepad++).

How i do that?

First i think the rich text box will be in different form & when open any file or create new file that form will appear. But I am not implement it as it not looks like Notepad++.

if we use Tab control then i think, the close button will not appear in tab.

Please help me!

Thank you in advance!
Tanmay Sarkar
theLizard
posted  598 posts
since  Oct 18, 2009 
from 

 Re: Load multiple text file in simple Notepad
  Posted on: 28 Aug 2010        1  
I have posted an example of doing this before so here it is again.

It does not use tabs but manages forms in an MDI application, using tabs is not that much different, instead of managing forms you manage tabs.
theLizard
http://www.c-sharplizards.com
Tanmay Sarkar
posted  194 posts
since  May 28, 2010 
from  India

 Re: Load multiple text file in simple Notepad
  Posted on: 28 Aug 2010        0  
Thanks for you support. Actually i want something different. Your app has nice look no doubt. But when it maximized, the look is changed.

Unfortunately i am unable to post image in this thread, so I upload 3 images your 2 (images) & what i am looking for 1 (image) .

Thanks for your valuable time to help me. But i want something different.

Please help me!
Thank you in advance!

[Any body can tell me how upload image in thread?]
Tanmay Sarkar
theLizard
posted  598 posts
since  Oct 18, 2009 
from 

 Re: Load multiple text file in simple Notepad
  Posted on: 28 Aug 2010        0  
As I said,  It does not use tabs but manages forms in an MDI application, using tabs is not that much different, instead of managing forms you manage tabs. (the Tab Control does it for you)

If you just want a form with a tab control just use the TabControl.TabPages.Add("the name of the file you just opened") then if you want to save a file use the tab page text property.

Using a tab control will be a lot easier than managing forms in my example, you just need to work out how to do it but the example gives you an idea..




theLizard
http://www.c-sharplizards.com
Sam Hobbs
posted  6490 posts
since  Sep 07, 2009 
from  Los Angeles, California, USA

 Re: Load multiple text file in simple Notepad
  Posted on: 28 Aug 2010        2  

I am not familiar with the classes that .Net provides for this but usinig C++ and .Net, it is possible to create a simple multiple-document editor in a few minutes (as in Simple CEditView Application). I am not however suggesting that you use C++ for this. As theLizard indicates, this is a perfectly valid use of MDI; you are using multiple windows and each window is for a separate, independent document. It is what MDI was designed for.
 
There is a sample C++ program called Superpad that is like a multiple-document version of Notepad. I am not suggesting you use C++ but I am surprised that there is not a C# version of it.
Thinking is a feeling; pleasant for some and unpleasant for others.
Tanmay Sarkar
posted  194 posts
since  May 28, 2010 
from  India

 Re: Load multiple text file in simple Notepad
  Posted on: 28 Aug 2010        0  
As "theLizard " suggest  i am using tab.and it works, But i say in my first post that "if we use Tab control then i think, the close button will not appear in tab."

And it's true, tab control have no that option. Where it appreciate that every tab must contain a close button. And it give a better look.

MDI is good but when more child are maximized, the looks are not better (i think).
That's why i upload 3 images in my previous post.

Thank you!
Tanmay Sarkar
Tanmay Sarkar
posted  194 posts
since  May 28, 2010 
from  India

 Re: Load multiple text file in simple Notepad
  Posted on: 29 Aug 2010        0  
Thank you sir, for your good link.There is a  nice note.




Tanmay Sarkar
theLizard
posted  598 posts
since  Oct 18, 2009 
from 

 Re: Load multiple text file in simple Notepad
  Posted on: 29 Aug 2010   Accepted Answer     0  
You do NOT need a close button on each tab, all you need to do is check which is the current tab and act on it with a single close button.  It is not that difficult.

I have also created a Tab based system using C++ see example. 

In this example (just a screen shot) the act of clicking on a tab or in a rich edit box sets the one an only open / close menu option to act on the tab or rich edit selected.

If you open a file, then the file is opened in the rich edit box of the tab selected and the status bar shows the file path and name.  Ctrl + S will save the active tab document.

Doing these things is not difficult, you just need to develop the ideas.

theLizard
http://www.c-sharplizards.com
theLizard
posted  598 posts
since  Oct 18, 2009 
from 

 Re: Load multiple text file in simple Notepad
  Posted on: 29 Aug 2010        0  
You do NOT need a close button on each tab, all you need to do is check which is the current tab and act on it with a single close button.  It is not that difficult.

I have also created a Tab based system using C++ see example. 

In this example (just a screen shot) the act of clicking on a tab or in a rich edit box sets the one an only open / close menu option to act on the tab or rich edit selected.

If you open a file, then the file is opened in the rich edit box of the tab selected and the status bar shows the file path and name.  Ctrl + S will save the active tab document.

Doing these things is not difficult, you just need to develop the ideas.

theLizard
http://www.c-sharplizards.com
Tanmay Sarkar
posted  194 posts
since  May 28, 2010 
from  India

 Re: Load multiple text file in simple Notepad
  Posted on: 29 Aug 2010        0  
I develop your idea, it's good & with your friendly help I build it.
My problem is solved but if it possible to add close button then it will be more nice job.


Thanks for your long support.
Thank you! :)
Tanmay Sarkar
       
Nevron Gauge for SharePoint
Dynamic PDF
ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
Introducing MaxV - one click. infinite control. Hyper-V Hosting from MaximumASP.
Finally – a virtual platform that delivers next-generation Windows Server 2008 Hyper-V virtualization technology from a managed hosting partner you can truly depend on. Visit www.maximumasp.com/max for a FREE 30 day trial. Hurry offer ends soon. Climb aboard the MaxV platform and take advantage of High Availability, Intelligent Monitoring, Recurrent Backups, and Scalability – with no hassle or hidden fees. As a managed hosting partner focused solely on Microsoft technologies since 2000, MaximumASP is uniquely qualified to provide the superior support that our business is built on. Unparalleled expertise with Microsoft technologies lead to working directly with Microsoft as first to offer IIS 7 and SQL 2008 betas in a hosted environment; partnering in the Go Live Program for Hyper-V; and product co-launches built on WS 2008 with Hyper-V technology.
Nevron Chart for .NET 2010.1 Now Available
The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
ASP.NET 4 Hosting
Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
6 Months Free & No Setup Fees ASP.NET Hosting!
 Hosted by MaximumASP  |  Found a broken link?  |  Contact Us  |  Terms & conditions  |  Privacy Policy  |  Site Map  |  Advertise with us
Current Version: 5.2011.3.12
 © 1999 - 2012  Mindcracker LLC. All Rights Reserved