Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delphi XE2 Style: Main Menu Ignored

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

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

like image 688
Alexandre Avatar asked Jul 16 '13 21:07

Alexandre


1 Answers

This is a limitation of the TMainMenuBarStyleHook Vcl Style hook. The normal approach to fix this kind of issue is create and register new TMainMenu Style hook, but unfortunately this Vcl Style hook is used internally by the TFormStyleHook (the vcl style hook of the forms), so this will require which you create a new form style hook as well and this implies a lot of work.

So my suggestion is replace the TMainMenu for a TActionMainMenuBar component which works very well with the vcl styles.

enter image description here

like image 155
RRUZ Avatar answered Nov 19 '22 22:11

RRUZ