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?
Any advice on how to apply style to the main menu?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With