Главная страница | назад





Article #18082: Getting a cool menu in your app

 Question and Answer Database

FAQ3082D.txt   :Getting a cool menu in your app
Category   :VCL
Platform    :Win95/NT
Product    :Delphi4.x,   

Question:
I want to have a menu that looks like Delphi 4's menu in my app.
How can I do that?


Answer:
1. Drop down a TControlBar. Align it to Client.
2. Drop down a TToolBar inside of the TControlBar.
3. Set Flat and ShowCaptions of the TToolBar to True.
4. Create as many TToolButtons on the TToolBar as you'd like.
5. Set Grouped to True for all TToolButtons. This will enable
   your menu to pop up menu after menu as you sweep across the
   menu (if a menu is already pulled down).
6. Drop down a TMainMenu, and make sure it's *not* attached
   to the form it's on.
7. Create the entire menu, with all its entries.
8. For each TToolButton, set its MenuItem to the corresponding
   menu item in the TMainMenu.


12/01/1998 1:39:32 PM
 

Last Modified: 01-SEP-99