Lazarus

Programming => Packages and Libraries => Lazarus Extra Components => Topic started by: kareka on January 12, 2019, 03:34:50 am

Title: TCHECKBOX and TRADIOBUTTON font color
Post by: kareka 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
Title: Re: TCHECKBOX and TRADIOBUTTON font color
Post by: ASerge 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;
Title: Re: TCHECKBOX and TRADIOBUTTON font color
Post by: kareka 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