Andrew Spencer 2 Posted June 7, 2023 (edited) Why can I set the Font.Color property, in Delphi 7, for controls like TCheckBox (and descendents TDBCheckBox etc) TRadioGroup and get the expected result. But in Delphi 10.4.2 everything remains clWindowText (or clBlack). TLabel.Font.Color works, but most other controls do not. Have I really just not noticed this for the past few years!? Edited June 7, 2023 by Andrew Spencer Share this post Link to post
Lajos Juhász 293 Posted June 7, 2023 If you enable Runtime Themes you delegate the drawing for some components to Windows and the colors from the Active Windows Theme is used. In ancient versions of Delphi this was done through XPManifest. You can use VCL Styles to customize the drawing. Share this post Link to post
PeterBelow 238 Posted June 7, 2023 3 hours ago, Andrew Spencer said: Why can I set the Font.Color property, in Delphi 7, for controls like TCheckBox (and descendents TDBCheckBox etc) TRadioGroup and get the expected result. But in Delphi 10.4.2 everything remains clWindowText (or clBlack). TLabel.Font.Color works, but most other controls do not. Have I really just not noticed this for the past few years!? This is the style support at work. You can disable/override it on a control basis using the StyleElements property. Share this post Link to post
David Heffernan 2345 Posted June 7, 2023 5 hours ago, Lajos Juhász said: You can use VCL Styles to customize the drawing. And also introduce large numbers of obscure bugs that will take forever to debug. 2 Share this post Link to post
KodeZwerg 54 Posted June 7, 2023 (edited) Or instead of dealing with the Vcl/Theme style you can easily put a label/panel next to a control and color it however you like and maybe add handler to simulate same behavior for mouse clicks. (Anchoring works great on that matter) Edited June 7, 2023 by KodeZwerg Share this post Link to post
WolfstarUA 0 Posted July 8, 2023 look at StyleElements and do false in seFont sorry for my english Share this post Link to post