VCL Styles and Menus

I have a couple of TAdvStickyPopMenus on my app. It would appear that they do not make use of all the VCL Style settings. With normal, light styles they look OK but if I change to a dark Style the text, radioboxes and checkboxes get changed to the dark colours but the background does not. This results in white text on a white background - not easy to read.

Is there some setting I have missed for the menus?

I also tried changing the VCL Style in your Menus demo but that seems to ignore the VCL styles completely.

menu-light-dark

Sorry, at this moment the menu component TAdvStickyPopupMenu does not support VCL styles.

That's a bit disappointing. Back to the drawing board for those menus!

Sadly, using VCL styles API in menus is far from trivial.

I found a way round the problem, attach the menu to a FantasyMenuStyler then
AdvMenuFantasyStyler1.Background.Color := StyleServices.GetStyleColor(scGenericBackground);
Probably not perfect but at least I can see the text now.

Sorry to have bothered you with this, I should have worked it out myself first. But maybe it will save someone else some time in the future!

1 Like