Mega Code Archive

 
Categories / Delphi / Examples
 

Creating delphi 4 style toolbars-menus

Question: How do I create Delphi 4 Style toolbars (like MS Office 97)? Answer: Do the following: 1) Drop a ControlBar component onto a form. 2) Set the Align property of the ControlBar to alTop. 3) Drop a ToolBar component onto the ControlBar. 4) Set the Align property of the ToolBar to alNone. 5) Set the Flat property of the ToolBar to TRUE. 6) Set the ShowCaptions property of the ToolBar to TRUE. 7) Right Click on the ToolBar and choose New Button; repeat a few times. 8) Drop a PopUpMenu for each ToolButton you added to the ToolBar onto the form. 9) Right click on each PopUpMenu component and choose Menu Designer- create Menu Items for each. 10) Set the DropDownMenu property of each ToolButton on the ToolBar to its respective PopUpMenu. 11) Set the AutoSize property of the ToolButtons to TRUE.