8 Replies - 842 Views - Last Post: 13 March 2010 - 07:52 PM Rate Topic: -----

#1 Trav  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 210
  • Joined: 01-March 10

Text Editor

Posted 11 March 2010 - 11:51 PM

I've got some spare time over the next couple weeks or so, anyway I was thinking of a project for C++ to occupy my time.

Anyway, I landed on a Text Editor. Nothing advanced with Syntax highlighting and Auto-Indentation, unless that's easier then I think.

I can design the text editor, but I don't even know where to start with loading a text file, obviously with an OpenFileDialog, but it's not to obvious on how to load it into the text field.

Also, should I use a Rich Text Box? What are the advantages, other then formatting your text.

Anyway, thanks for your potential contribution.

Is This A Good Question/Topic? 0
  • +

Replies To: Text Editor

#2 muballitmitte  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 172
  • View blog
  • Posts: 470
  • Joined: 05-November 08

Re: Text Editor

Posted 12 March 2010 - 12:02 AM

Nowadays writing a simple text editor is one rainy afternoon exercise (unless you love rainy days). It`s easy if you use for example .NET. Do not start with loading files. Start with creating a text area use a Richbox so you can format the text and after you added a basic functionality like: change text font (here is syntax highlighting), auto-indent you can start adding the load/save/open/print functionality. Of course all of those are easy as .NET provides components for everything. Also, to make the project cooler you could make a MDI application and have multiple documents opened at once and in that case that is how you should start. Anyway, start with basic functionality and work your way up. Hope all of this help, dude.

This post has been edited by muballitmitte: 12 March 2010 - 12:05 AM

Was This Post Helpful? 0
  • +
  • -

#3 Trav  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 210
  • Joined: 01-March 10

Re: Text Editor

Posted 12 March 2010 - 12:34 AM

Yeah that cleared things up. If I read your post correctly, I should just get started on font, size, style, etc. But when i do get to Open, Save etc... Do you have any reference to where I can get a grasp of how to do it?
Was This Post Helpful? 0
  • +
  • -

#4 muballitmitte  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 172
  • View blog
  • Posts: 470
  • Joined: 05-November 08

Re: Text Editor

Posted 12 March 2010 - 01:47 AM

It`s a matter of choice in the end how you start and continue. For me, it made more sense to build some basic functionality first, and then after you are happy that the editing part of the "text editor" works make some save,open buttons(or file menus). This article (google the next parts after) should get you on your way. Still, if I were you I would go to sourceforge, look for a project there and join the development team. The reward will be n-fold.

This post has been edited by muballitmitte: 12 March 2010 - 01:47 AM

Was This Post Helpful? 0
  • +
  • -

#5 Trav  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 210
  • Joined: 01-March 10

Re: Text Editor

Posted 12 March 2010 - 02:18 AM

The article you provided is in Visual Basic I believe. I'm doing this in C++.
Was This Post Helpful? 0
  • +
  • -

#6 muballitmitte  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 172
  • View blog
  • Posts: 470
  • Joined: 05-November 08

Re: Text Editor

Posted 12 March 2010 - 02:45 AM

I know; it was just to see the conceptual part behind. So you want to use C++. What other libraries or frameworks did you think of using? (i`m asking this because the internet is full of examples for specific choices)

This post has been edited by muballitmitte: 12 March 2010 - 02:48 AM

Was This Post Helpful? 0
  • +
  • -

#7 Trav  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 210
  • Joined: 01-March 10

Re: Text Editor

Posted 12 March 2010 - 04:25 AM

Well I just planned to use the Form Designer in Visual C++ Express.
Was This Post Helpful? 0
  • +
  • -

#8 muballitmitte  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 172
  • View blog
  • Posts: 470
  • Joined: 05-November 08

Re: Text Editor

Posted 13 March 2010 - 06:41 AM

Ok then, with windows forms it`s going to be easy as I said before. Write some code and see how everything goes. Sorry I couldn`t help you with more tutorials, dude.
Was This Post Helpful? 0
  • +
  • -

#9 Trav  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 210
  • Joined: 01-March 10

Re: Text Editor

Posted 13 March 2010 - 07:52 PM

It's ok, thanks anyway.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1