2.5 Adding the Text Control

The next task is to add the main text editing control to our frame. This control is called wxTextCtrl. The txtEditor field is automatically sized to the available space. If you resize the frame, the field resizes. Notice that wxWindows provides you with a scrollbar. The field will automatically, scroll if you go beyond the bottom. If you type line longer than the width of the edit window, they will wrap. You also have cut and paste functionality, and block marking by default.