The WinForms Notepad Project: A Little Formatting (Premium)


As you may recall, we used a RichTextBox control for this. But as its name suggests, the RichTextBox control works with rich text, which includes formatting like bold, italics, and even things like bulleted list items, and it can load and save to RTF files in addition to plain text (TXT) files. That’s all very useful. But Notepad isn’t a rich text editor, it’s a plain text editor.

You can see the problem if you run the application, paste in or write some text, and then select part or all of it and use a keyboard shortcut like CTRL + B to apply the bold style. (If you paste in rich text, you’ll get the formatting with it, too, including URLs.) That’s no good.

Gain unlimited access to Premium articles.

With technology shaping our everyday lives, how could we not dig deeper?

Thurrott Premium delivers an honest and thorough perspective about the technologies we use and rely on everyday. Discover deeper content as a Premium member.

Become a Premium Member Create a Free Account