Wednesday, April 24, 2013

Main Menu

1. Place the TMainMenu widget on your form

2.Double click on the widget.

3.Click on NewItem1.

4.The object inspector will display the properties of the MenuItem1.]

5. Change the caption property to "New caption" or anything you like.

6.Right click on it and select "insert new item (after)" to create a second item after our first item.
and right click again and select "create submenu".

7.Select one of the button that you create and double click on it. Write the code you want for example:

8.You can add a shortcut for your menu, by changing the "shortcut" property for a specific button in the object inspector

9.If we want to add an image in our menu we add an image list in our form and we change "images" property of mainmenu1 to "imagelist1".

10.Then we double click on imagelist1 and imagelist editor show up.

11.Click on add and select your image..

12.Press ok and close imagelist editor. Then select your menu item and change the image index property.

13.And voila!!


  1. thank you, please post more.

  2. thank you, helpful more tutorial.