Recent

Author Topic: [SOLVED] Font.color in RadioGroup not working  (Read 10548 times)

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 592
    • Double Dummy Solver - free download
[SOLVED] Font.color in RadioGroup not working
« on: December 19, 2014, 07:04:26 pm »
Font size, name, strikethrough, style, etc. all are working in radiogroups except font.color. Since I have a dark background color for the Radio Group I need a light colored font - but I can only get clBlack. I saw a post about this problem from 2005 - with no resolution. Is there a way to get a clWhite font.color for a radiogroup?
« Last Edit: December 19, 2014, 10:59:36 pm by bobonwhidbey »
Lazarus 3.0RC2, FPC 3.2.2 x86_64-win64-win32/win64

zeljko

  • Hero Member
  • *****
  • Posts: 1596
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: Font.color in RadioGroup not working
« Reply #1 on: December 19, 2014, 07:48:03 pm »
Some widgesets themes does not allow font color change. I suppose that you're on windows, so:
1.Does it work with classic theme ?
2.Can you change font color of single radio button ?

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 592
    • Double Dummy Solver - free download
Re: Font.color in RadioGroup not working
« Reply #2 on: December 19, 2014, 09:42:01 pm »
I switched to Windows Classic theme - no change.

This radio group has 12 monthly buttons. I can change individual font.styles, etc. with this approach, but not the color. Notice that the loop starts at "1". I would have thought that it should start at "0" - but it doesn't!! I can not change the font.color of any single radio button. For example, this does nothing:

Code: [Select]
  with TRadioButton(MonthRG) do
    for i := 1 to 12 do begin
      Controls[i].Font.Color := clwhite;
      Controls[i].Color := clGreen;
  end;

Changing the Parent Font.color, and then setting the RadioGroup ParentFont to true does nothing.
Lazarus 3.0RC2, FPC 3.2.2 x86_64-win64-win32/win64

Bart

  • Hero Member
  • *****
  • Posts: 5290
    • Bart en Mariska's Webstek
Re: Font.color in RadioGroup not working
« Reply #3 on: December 19, 2014, 09:52:21 pm »
It'll probably work with themes disabled (in project options).

Bart

bobonwhidbey

  • Hero Member
  • *****
  • Posts: 592
    • Double Dummy Solver - free download
Re: [SOLVED] Font.color in RadioGroup not working
« Reply #4 on: December 19, 2014, 11:03:24 pm »
I unchecked "Use manifest file to enable themes (Windows only)". After recompling all worked well. THANK YOU Bart.
Lazarus 3.0RC2, FPC 3.2.2 x86_64-win64-win32/win64

 

TinyPortal © 2005-2018