Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Text Editor Using C#

0.00/5 (No votes)
3 Aug 2007 1  
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.

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 has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here