Recent

Author Topic: Font color in RadioGroupBox  (Read 199 times)

dgrhoads

  • Newbie
  • Posts: 4
Font color in RadioGroupBox
« on: July 18, 2019, 11:32:13 pm »
When I try to change the color of the font in a RadioGroupBox, the font color does not change.  Is this a feature or a bug?  All the radiobuttons plus the title should be affected.

I am able to underline text and change fonts in that box, but not the font color.

wp

  • Hero Member
  • *****
  • Posts: 6149
Re: Font color in RadioGroupBox
« Reply #1 on: July 18, 2019, 11:44:41 pm »
A known restriction of some widgetsets.

To see other restrictions you could look at the Restriction Browser ("View" > "Restriction Browser") where you can filter for the control and the widget set (indicated by the characteristic icons). (There is also a page "Restricted" in the Object Inspector, but I must confess that I never understood it.)
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

lucamar

  • Hero Member
  • *****
  • Posts: 1986
Re: Font color in RadioGroupBox
« Reply #2 on: July 19, 2019, 07:00:36 am »
I just tested in Linux. Setting the color to clMaroon at design time worked both in the IDE and at run-time (which doesn' happen with e.g. TCheckGroup).

Then I added this line to the form's OnCreate handler (rgOptions is the radio group):
Code: [Select]
  rgOptions.Font.Color := clNavy;and it worked also, as can be seen in the attached image.

Couldn't test on Windows, so YMMV.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.