Working With Menus
Create The Menu
In the SDI application, you are provided with a File menu and a Help menu. The File menu has Open, Save and Exit commands, while Help has the About command. We use the Menu Designer (Day 7 of Borland in 14 days) to alter our menu.
Click here to view a video of this process.
- Find the menu icon in the SDI form.
- Click on the menu icon and you will see the Menu Designer
- Wherever you see a dotted rectangle you may add items. We want to put in a new menu between File and Help so I select
the Help menu and press the right mouse button to get a menu. Select insert from the menu.
- Now we have an empty menu where we want our new menu.
- The empty item in the Object Inspector corresponds to the highlighed (red) item in the menu. In this case the Menu Name. Change the name and caption here.
- Next select a menu item. You can change its name and caption in the Object Inspector.
- After you have completed your menu, close the Menu Design window and your will see your menu is complete in the form.
Create Menu Command Handlers
You need only click on the menu item you want in the main form and you will create the handler and it will appear in the middle of the form's edit window. To see an example of a handler for the menu we created click here .