5
votes

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.

1
Did you try to use a TActionMainMenuBar?Sertac Akyuz
+1 @Sertac. Here RRUZ also recommends to use TActionMainMenuBar instead of TMainMenu, and I would trust anything this guy says about VCL styles.kobik
@kobik - Interesting usage in the question you linked... Indeed, styles might be owing him whatever grace it is receiving from developers (not sure if this is English, meant as a compliment :)).Sertac Akyuz
Will XP never die? ;-)David Heffernan
@David - Not before metro dies, I hope...Sertac Akyuz

1 Answers

5
votes

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.