Recent

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

dgrhoads

  • New member
  • *
  • Posts: 8
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: 7537
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.)
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

lucamar

  • Hero Member
  • *****
  • Posts: 3022
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.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

TeoUrbana

  • New Member
  • *
  • Posts: 39
    • Distração For Fun
Re: Font color in RadioGroupBox
« Reply #3 on: May 11, 2020, 11:32:52 pm »
Uncheck the option For Windows:"Use manifest resource (and enable themes) in Project -> Project Options -> Application.

But it can "spoil" something else, like the image of the disabled buttons.

zoltanleo

  • Sr. Member
  • ****
  • Posts: 262
Re: Font color in RadioGroupBox
« Reply #4 on: May 12, 2020, 01:14:44 pm »
I just tested in Linux.
Drawing of controls has very large differences depending on the set of widgetsets. I created a similar thread
 
https://forum.lazarus.freepascal.org/index.php/topic,36218.msg241058.html#msg241058

when I first encountered this behavior. Regular Linux users are less restricted in creative freedom than regular Windows users  :D

Win10 LTSC x64/Deb 10 amd64/Darwin Cocoa:
Lazarus x32/x64 2.1(r.63554); FPC 3.3.1 (r.45871), FireBird 3.0.6

Sorry for my bad English, I'm using translator ;)

jamie

  • Hero Member
  • *****
  • Posts: 3526
Re: Font color in RadioGroupBox
« Reply #5 on: May 12, 2020, 11:10:23 pm »
Well feel lucky that you have that freedom..

Just remember that you should be designing any app with maximum restrictions in mind if you plan on cross porting it..
The only true wisdom is knowing you know nothing

lucamar

  • Hero Member
  • *****
  • Posts: 3022
Re: Font color in RadioGroupBox
« Reply #6 on: May 13, 2020, 08:14:49 am »
Regular Linux users are less restricted in creative freedom than regular Windows users  :D

Not really; depends quite a lot on which combination of Desktop Environment+Window Manager+Composition Manager+Theme one is using. I have found that simply moving an application from, say, Ubuntu to Xubuntu discombobulates all your carefully thought out customizations
%) :P
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.8/FPC 3.0.4 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

wp

  • Hero Member
  • *****
  • Posts: 7537
Re: Font color in RadioGroupBox
« Reply #7 on: May 22, 2020, 10:27:55 am »
I added a new package, ExCtrls, to CCR (https://sourceforge.net/p/lazarus-ccr/svn/HEAD/tree/components/exctrls/) which contains extended versions of TCheckBox, TRadioButton, TRadioGroup and TCheckGroup that inherit from TCustomControl and thus are not drawn by the widgetset to give more freedom - see wiki and attached screenshot
« Last Edit: May 22, 2020, 11:59:24 am by wp »
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

zoltanleo

  • Sr. Member
  • ****
  • Posts: 262
Re: Font color in RadioGroupBox
« Reply #8 on: May 22, 2020, 11:02:08 am »
@wp

Wow  :o

Thank U!

Update: thank you very much Werner! It's very interesting components. I maded translation your wiki to russain.
« Last Edit: May 23, 2020, 01:27:20 am by zoltanleo »
Win10 LTSC x64/Deb 10 amd64/Darwin Cocoa:
Lazarus x32/x64 2.1(r.63554); FPC 3.3.1 (r.45871), FireBird 3.0.6

Sorry for my bad English, I'm using translator ;)

 

TinyPortal © 2005-2018