Delphi XE2 style: main menu ignored

I applied the style to the VCL application in Delphi XE2, but it works fine, but it seems that the main menu has ignored the style. See Attached Image. Is this normal behavior? enter image description here

Any tips on how to apply style to the main menu?

+7
delphi delphi-xe2 menu vcl-styles
source share
1 answer

This is a limitation of the TMainMenuBarStyleHook Vcl Style. The usual approach to fix this type of problem is to create and register a new TMainMenu style hook, but unfortunately this Vcl style hook is used inside TFormStyleHook (binding vcl style to forms), so this will require you to create a new style, and it will require a big work.

So my suggestion replaces TMainMenu for the TActionMainMenuBar component, which works very well with vcl styles.

enter image description here

+10
source share

All Articles