Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi: Styled TMainMenu and TToolBar in TCoolBar

I'm attempting to create an application menu and toolbar in Delphi XE3 that looks like the following (from a program I have):

Main menu and toolbar in TCoolBar

I'm able to replicate a portion of this look by doing the following:

  1. Create a new VCL Forms application
  2. Add a TMainMenu and insert template menus for File/Edit/etc.
  3. Add a TCoolBar to the form
  4. Add a TToolBar to the TCoolBar
  5. Add a TToolButton to the TToolBar for each of File/Edit/etc. and choose the Group property
  6. Delete the Menu property from the form (so no program menu shows)
  7. Assign the MenuItem property for each TToolButton to the corresponding File/Edit/etc.
  8. Add a second TToolBar to the TCoolBar beneath the first one

Here's what it looks like:

My main menu and toolbar in TCoolBar

It's somewhat similar but is still missing all the style elements to modify the look of the new application menu.

My question is, does anyone know of how to achieve a similar look, perhaps with a third-party component library? It seems likely that the original developer used a third-party VCL library. I'd like the drop shadow in addition to the styled menus and TCoolBar.

I've tried Raize Components, TMS Advanced Toolbars & Menus, and am in the process of trying DevExpress VCL components. None of them seem to provide a solution, but perhaps I'm not familiar enough with them yet to figure it out.

like image 591
spurgeon Avatar asked Feb 14 '13 23:02

spurgeon


1 Answers

Delphi has come with an ActionBands demo that can show you how to obtain this appearance "out of the box" for your menus using TActionMainMenuBar (and TActionToolBar). Just change the Style menu to XP Style in the demo:

ActionBands demo

The rest of your steps seem pretty well complete. For the images on the menu items and toolbar buttons, see the use of ImageList components in association with the TActions on the menu and toolbar in the demo.

like image 180
Ken White Avatar answered Sep 28 '22 07:09

Ken White