Jump to content
Ian Branch

Set colour for TStaticText with themes.

Recommended Posts

Hi Team,

I have used a TStaticText but the Font|Colour property doesn't do anything. 😞

Is there a fix for this??

If not, why is the property there??

 

Ian

Share this post


Link to post
6 hours ago, Ian Branch said:

Hi Team,

I have used a TStaticText but the Font|Colour property doesn't do anything. 😞

Is there a fix for this??

If not, why is the property there??

 

Ian

Deselect seFont in the StyleElements property.

Share this post


Link to post

Do you have Transparent property set to true? if it is change it to false

Edited by Clément

Share this post


Link to post

It was on.  I turned it off and the font color shows at design time but not at run time.

Share this post


Link to post

I created a new form with nothing but a TStaticText on it.

I set the VCL Style to Windows 11 Polar Light. 

With StyleElements seFont & seClient off, and transparent off, I get the green text but at run time the text background is the standard windows background.

If I turn Transparent on the color disappears at design & run time.

If I turn seClient on, the color stays at design time but disappears at run time.

If I leave seClient off and turn seFont on, the color stays at design and run time but I get the standard windows background.

I changed to one of the standard VCL Styles and get the same results. 😞

Perhaps a bug with TStaticText and VCL Styles??

Oh well.  Back to TLabel and flickering... 😞

 

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

×