Mega Code Archive

 
Categories / Delphi / Examples
 

Creating office menus

How to Create Office like menu ? Drop down a TControlBar or a TCoolbar. Drop down a TToolBar inside of the TcontrolBar or TCoolbar. Set Flat, and ShowCaptions of the TToolBar to True. Create as many TToolButtons on the TToolBar as you'd like with the AutoSize property to True. 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). Drop down a TMainMenu, and make sure it's *not* attached to the form it's on. Create the entire menu, with all its entries. For each TToolButton, set its MenuItem to the corresponding menu item in the TmainMenu (ie the « File » assign the File1 menuitem, etc…). FYI, there is a free component supposed to ease that procedure on the borland site http://www.borland.com/devsupport/delphi/download_files/menubar.zip