5.7. A Simple Text Editor

Now let’s see how to write a simple text editor in just a few minutes, using the functionality we have discussed in this chapter so far.

First we create a Windows application and add some controls to the form. As Figure 5.19 shows, we add two label controls and set their Text properties to Available Fonts and Size, respectively. Then we add a combo box, a NumericUpDown control, and two button controls with the Text properties set to Color and Apply, respectively. We will use the combo box control to display all installed fonts, the NumericUpDown control to set the size of text, and the Color button to set the text color. We also add a RichTextBox control to the form and size it appropriately.

Figure 5.19. A simple ...

Get Graphics Programming with GDI+ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.