Page 138 - DCAP408_WEB_PROGRAMMING
P. 138
Windows Programming
Notes Run your code again, and Click File > Open from your menu. You should see this at the top of the
Open dialogue box:
Self Assessment
Fill in the blanks:
6. From the dialogue box, you can click on a file to select it, then click …………………….
button.
7. When we click on File > Open from our menu, we want the …………………… box to
appear.
8.3 Creating a Text Editor
Despite initial appearances, writing a text editor is not a trivial task. Creating text editors takes
programming experience and a firm basis in theory. The internet is littered with hundreds of
unfinished or poorly working text editors. While this topic does not tell you everything you
need to know to write your own text editor, you will learn how to add syntax highlighting and
gain a sense of the overall complexity of undertaking such a project.
Did u know? What you will need for creating text editor?
If you haven’t done so already, download the syntax highlighting package and the
ProgrammerEditorDemo.java that comes with it. If you would like you may browse the
source code for the demo.
Running the Demo
The demo is a very simple text editor:
The demo supports cut, copy, paste, and syntax highlighting, but little else. It doesn’t even open
and save files.
132 LOVELY PROFESSIONAL UNIVERSITY