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.

  1. Find the menu icon in the SDI form.

  2. Click on the menu icon and you will see the Menu Designer

  3. 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.

  4. Now we have an empty menu where we want our new menu.

  5. 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.

  6. Next select a menu item. You can change its name and caption in the Object Inspector.

  7. After you have completed your menu, close the Menu Design window and your will see your menu is complete in the form.

Click here to view a video of this process.

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 .