Lazarus

Using the Lazarus IDE => General => Topic started by: Muso on April 17, 2021, 01:46:09 pm

Title: [fixed] ParentBackground of GroupBoxes cannot be set to true
Post by: Muso 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.
Title: Re: ParentBackground of GroupBoxes cannot be set to true
Post by: lucamar 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.
Title: Re: ParentBackground of GroupBoxes cannot be set to true
Post by: Muso 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.
Title: Re: ParentBackground of GroupBoxes cannot be set to true
Post by: wp 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").
Title: Re: ParentBackground of GroupBoxes cannot be set to true
Post by: Muso 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.
Title: Re: ParentBackground of GroupBoxes cannot be set to true
Post by: Muso 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.
Title: Re: ParentBackground of GroupBoxes cannot be set to true
Post by: wp 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...
Title: Re: ParentBackground of GroupBoxes cannot be set to true
Post by: Muso on April 20, 2021, 03:34:28 am
Please report a bug and mention this discussion.

Done: https://bugs.freepascal.org/view.php?id=38777
Title: Re: ParentBackground of GroupBoxes cannot be set to true
Post by: Muso on April 21, 2021, 07:23:52 pm
The bug has now been fixed. Many thanks.
TinyPortal © 2005-2018