Jump to content
Sign in to follow this  
Javier Tarí

Help on obtaining the theme colors for manu backgrounds

Recommended Posts

Any idea on how to get the colors used by a Vcl Theme to paint menu backgrounds? 
StyleServices.GetElementColor(Details,ecFillColor,vColor) does not return them for almost none of TThemedMenu values
I can see a PopupMenu using a few background colors, depending on a combination of item selection and enabled state, but can't get them programmatically

Share this post


Link to post

From the help it looks like the StyleServices function can take a parameter that specifies the control you want the style info for. So, have you tried to pass a main  menu instance as this parameter? Or look at the drawing code in vcl.menus.pas, that should show you how the vcl gets the colors to draw with.

Edited by PeterBelow

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×