Click here to Skip to main content
15,885,767 members
Articles / Programming Languages / C#

Text Editor Using C#

Rate me:
Please Sign up or sign in to vote.
1.69/5 (15 votes)
3 Aug 2007CPOL1 min read 82.8K   3.9K   31   5
Text Editor for typing a new document, article, news, etc.

Introduction

This is an old style text editor that is still being used in some applications. The aim is to type a document, article, or news for users who perfectly remember using DOS commands in the past.

This text editor looks like a Pascal or C++ application under DOS, with a blue color background, white forecolor text, and is limited to 80 characters per line.

But don't look down on it; even though it looks very simple and has a flat interface, this cool text editor has many features that will give it more credit from your point of view. Here are some of the features that are available:

  • Font size
  • Fore color
  • Back color
  • Spelling checker

Screenshot - text_editor.jpg

If you want to add more features, no problems.. just follow the sample inside the code.

Using the code

This article provides the source code on the top; you can download it and see that there are two projects to build this text editor:

  1. Best.Editor
  2. Best.Main

You need to run the project under the Best.Main folder, and inside it, find the main form which calls the user control from the Best.Editor project.

Basically, the control that is used for typing text is a RichTextBox. Then, with your creativity to enhance it, define properties that will be give new features to this text editor.. example: alignment, save as, print, etc.

C#
protected Color foreColor;
public Color z_ForeColorget 
{
    get
    {
        return foreColor;
    }

    set
    {
        foreColor = value;
    }
}

protected Color backColor; 
public Color z_BackColorget 
{
    get
    {
    return backColor;
    }

    set
    {
    backColor = value;
    }
}

Good luck, and hope it helps you..

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
ace
Web Developer
Singapore Singapore
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
Generalask you a simple question Pin
fangpipig20-Apr-11 20:42
fangpipig20-Apr-11 20:42 
GeneralMy vote of 5 Pin
fangpipig20-Apr-11 20:39
fangpipig20-Apr-11 20:39 
GeneralAhh the old days Pin
loneferret4-Aug-07 3:22
loneferret4-Aug-07 3:22 
GeneralRe: Ahh the old days Pin
ace4-Aug-07 3:29
ace4-Aug-07 3:29 
GeneralGood Start Pin
aamironline3-Aug-07 4:18
aamironline3-Aug-07 4:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.