Jump to content
Jeff Steinkamp

Radio Button and Check Box font color not changing with parent..

Recommended Posts

On my form I have 2 radio buttons and 3 check boxes.  If I change the font of the parent, the font of the control does change, but the foreground color remains black, both design time and runtime.  I do have the ParentFont and ParentColor properties set to true.  I have even attempted to change the font color of the individual component at runtime and they still remain black.  The behavior I would expect is the component font properties would inherit from the parent.

 

Is this a bug, or do I have something set incorrectly in the IDE?

Share this post


Link to post
1 hour ago, programmerdelphi2k said:

just uncheck "enable runtime themes" in your project and change the colors...

Unfortunately that removes a couple of other features from your app.

Share this post


Link to post
1 hour ago, programmerdelphi2k said:

@Jeff Steinkamp

 

unfortunatelly, now all is "Themed" then, just uncheck "enable runtime themes" in your project and change the colors...

 

image.thumb.png.9e6711e674a89100b24182719159ef04.png

That does appear to be a workaround, but it screws up the transparency of all the menu icons and removed all the images from the buttons.  However, I can still select any of the themes this way, but with the image limitations I just provided.

 

With runtime themes enable and selecting Windows as the default theme. I am able to change the colors and fonts of the form.  The font style for the Radio Buttons and Check Boxes will change, It is just the font color that will not change on these two components.  The font color does change for everything else on the form. 

Share this post


Link to post

There was a debate about something like this at TMS. The reason is a bug in Windows.
I guess it applies to this case as well. I don't remember exactly.

Share this post


Link to post
On 6/11/2023 at 5:51 PM, Jeff Steinkamp said:

On my form I have 2 radio buttons and 3 check boxes.  If I change the font of the parent, the font of the control does change, but the foreground color remains black, both design time and runtime.  I do have the ParentFont and ParentColor properties set to true.  I have even attempted to change the font color of the individual component at runtime and they still remain black.  The behavior I would expect is the component font properties would inherit from the parent.

 

Is this a bug, or do I have something set incorrectly in the IDE?

See if the controls you use have a StyleElements property showing in the Object Inspector. This allows you to switch off styling for certain UI elements on a per control basis.

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

×