September 2002
Intermediate to advanced
496 pages
10h
English
The important part of modern window-based user interfaces is menus. We implement them in code so that we do not need any additional resource file. We build up an application menu using the MenuItem class objects that can contain subitems of the same class. The top-level menu is a MainMenu class object. We assign its reference to the Menu property of our form. To handle choosing by the user of menu items, we hook a delegate to the Click event.
In Step 4, we enrich our WinTime application by adding a simple menu (see Figure 14-5). By choosing File | Exit, we can exit our program. The code for this step resides in the WinTime\Step4 directory.
# # WinTime.pl – Step 4 # . . . =for interface ...