Welcome, Guest
Username: Password: Remember me

Change Panel colour using VCL style

Posts 1 to 2 of 2
7 months 1 week ago #7009
How can I have different panel colors that apply a VCL style color.
In the Bitmap Style Designer I can set the application SysColors.How can I use a different system color?; say BtnHighlight instead of BtnFace for a background color.
The only way so far to change the panel color is to turn off client styling and set the color manually.But this breaks styling; and set the color to BtnHighlight doesn't use the VCL style BtnHighlight; but instead uses the Windows System Color.
Do I need to register a TStyleHook?Which would get tedious very quickly if I have multiple style panel colors.
Also in FMX I could simply make a new style and apply it to the control.How come I can't do the same with VCL styles.
Last Edit: 7 months 1 week ago by Tony T29051.
Log in to reply.
7 months 1 week ago #7012
I found it.
Turn off client styling then use the Panel1->Color = StyleServices()->GetStyleColor({style})
Log in to reply.
Moderators: @aprilanne