Displaying the Menu Editor
To display the Menu Editor
- Choose Menu Editor from Tools Menu or
- Click the Menu Editor button on the toolbar or
- Click the form and press Ctrl + E.
Now we must add the following menus to the menu
bar.
- Main
- Color
- Border
- Message
We will also add accelerator keys to the menu bar
options so that the user can select a menu bar option
using the keyboard. When you add items to the Menu
Editor, those items either appear on the application's
menu bar or on a pull down menu depending on how you
specify the values. Now let's add the menus to our
application.
- Type &Main for the caption field. The ampersand
indicates that M will be the accelerator key.
- Press Tab to move to the Name Field. Type mnuMain
for the name field.
|
Use a consistent naming convention
for menu names. Begin all menu names with the
prefix mnu. |
- Leave all the other fields and click the Next
button.
- Type &Color for the next menubar option and
type mnuColor for the name. Click the Next button
to add the next item.
- Type &Border for the next menubar option and
type mnuBorder for the name. Click the Next button
to add the next item.
- Type M&essage for the next menubar option
and type mnuMessage for the name.
Your Menu Editor should look like the one shown in
the following figure:
Figure 6.5
|