Recent

Author Topic: TCHECKBOX and TRADIOBUTTON font color  (Read 2447 times)

kareka

  • Newbie
  • Posts: 3
TCHECKBOX and TRADIOBUTTON font color
« on: January 12, 2019, 03:34:50 am »
Hi,

How to change the font color for TCheckbox and TRadiobutton caption to white. I've set font/color to white in property. But it doesn't work when the theme was active.
I still need active theme for other component.
Form background using dark color.

Lazarus-IDE 1.8.4

Thx

ASerge

  • Hero Member
  • *****
  • Posts: 1412
Re: TCHECKBOX and TRADIOBUTTON font color
« Reply #1 on: January 12, 2019, 12:06:25 pm »
How to change the font color for TCheckbox and TRadiobutton caption to white. I've set font/color to white in property. But it doesn't work when the theme was active.
I still need active theme for other component.
Checked in Windows:
Code: Pascal  [Select]
  1. uses UXTheme;
  2.  
  3. procedure TForm1.Button1Click(Sender: TObject);
  4. begin
  5.   SetWindowTheme(CheckBox1.Handle, '', '');
  6.   SetWindowTheme(RadioButton1.Handle, '', '');
  7.   CheckBox1.Font.Color := clWhite;
  8.   RadioButton1.Font.Color := clWhite;
  9. end;

kareka

  • Newbie
  • Posts: 3
Re: TCHECKBOX and TRADIOBUTTON font color
« Reply #2 on: January 14, 2019, 02:16:49 am »
How to change the font color for TCheckbox and TRadiobutton caption to white. I've set font/color to white in property. But it doesn't work when the theme was active.
I still need active theme for other component.
Checked in Windows:
Code: Pascal  [Select]
  1. uses UXTheme;
  2.  
  3. procedure TForm1.Button1Click(Sender: TObject);
  4. begin
  5.   SetWindowTheme(CheckBox1.Handle, '', '');
  6.   SetWindowTheme(RadioButton1.Handle, '', '');
  7.   CheckBox1.Font.Color := clWhite;
  8.   RadioButton1.Font.Color := clWhite;
  9. end;

Thank you