Recent

Author Topic: [fixed] ParentBackground of GroupBoxes cannot be set to true  (Read 2461 times)

Muso

  • Sr. Member
  • ****
  • Posts: 356
[fixed] ParentBackground of GroupBoxes cannot be set to true
« on: April 17, 2021, 01:46:09 pm »
I am using latest Lazarus trunk on Windows (via fcupdeluxe).

While testing the new Laz features, I found that the new GrupBox property "ParentBackground" cannot be set to TRUE, see the screencast attached.

Also when you create a new GroupBox, "ParentBackground" is by default set to FALSE, despite the Laz 2.2 release notes states the default is TRUE.
« Last Edit: April 21, 2021, 07:24:02 pm by Muso »

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: ParentBackground of GroupBoxes cannot be set to true
« Reply #1 on: April 17, 2021, 02:23:13 pm »
Can it be a widgetset restriction? I've noticed that when it's so the property becomes unchangeable in the OI.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

Muso

  • Sr. Member
  • ****
  • Posts: 356
Re: ParentBackground of GroupBoxes cannot be set to true
« Reply #2 on: April 17, 2021, 02:50:28 pm »
Can it be a widgetset restriction?

I don't think so since all other properties can be changed without problems.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: ParentBackground of GroupBoxes cannot be set to true
« Reply #3 on: April 17, 2021, 03:42:02 pm »
I checked it my self, and it is working correctly at both design and run time (Win 10/64bit, Laz-trunk/FPC 3.2.0/32bit).

If this demo does not work for you do a clean rebuild of your IDE ("Tools" > "Configure Build Lazarus" > Check "Clean all" and "Switch after building to automatically" > "OK").
« Last Edit: April 17, 2021, 03:48:45 pm by wp »

Muso

  • Sr. Member
  • ****
  • Posts: 356
Re: ParentBackground of GroupBoxes cannot be set to true
« Reply #4 on: April 17, 2021, 07:58:20 pm »
If this demo does not work for you do a clean rebuild of your IDE ("Tools" > "Configure Build Lazarus" > Check "Clean all" and "Switch after building to automatically" > "OK").

The demo works for me.
I also rebuilt the IDE as you suggested but the problem persists. To reproduce:

- take a project you created with Laz 2.0.x
- open it with todays' laz 2.2dev
- either check existing group boxes or create a new one

Attached is a simple program where you can reproduce the behavior.

So there must be something in the *.lfm file that causes the bug.

Muso

  • Sr. Member
  • ****
  • Posts: 356
Re: ParentBackground of GroupBoxes cannot be set to true
« Reply #5 on: April 18, 2021, 05:42:59 pm »
Can anybody reproduce this with the example project I provided in my previous post?

If so, I will create a bug report.

wp

  • Hero Member
  • *****
  • Posts: 11830
Re: ParentBackground of GroupBoxes cannot be set to true
« Reply #6 on: April 18, 2021, 05:56:13 pm »
Please report a bug and mention this discussion.

It looks as if ParentBackground and ParentColor are mutally interlocked, you can only check one of them - in Delphi both are independent.

In the meantime you can unlock the setting by changing the groupbox Color to something different. Having done this you can reset ParentBackground to true. Although changing the Color of the groupbox switches its ParentColor to false the groupbox still shows the color of the form since it is transparent when Parentbackground is true. So, to me, both properties are some kind of redundant...

Muso

  • Sr. Member
  • ****
  • Posts: 356
Re: ParentBackground of GroupBoxes cannot be set to true
« Reply #7 on: April 20, 2021, 03:34:28 am »

Muso

  • Sr. Member
  • ****
  • Posts: 356
Re: ParentBackground of GroupBoxes cannot be set to true
« Reply #8 on: April 21, 2021, 07:23:52 pm »
The bug has now been fixed. Many thanks.

 

TinyPortal © 2005-2018