Hi list.
For some time i have had a strange bug in my program which essentially boils down to a
TRadioGroupBox being visible, even though it has explicit been set to false (in code).
At first i though this was due to some strange coding of mine, but i have managed to
recreate the issue with a short sample (attached).
It seems that all TCustomGroupBox descendants (at least TGroupBox, RadioGroup, CheckGroup)
suffer from the same problem. Even more strange is that in order to provoke the groupbox
to become visible when not wanted, it MUST include a Frame, a PageControl, a Panel and a BitButton.
This bug is only present with the GTK2 widgetset. I have tested with Lazarus 1.2.6 and
latest trunk: Lazarus 1.3 r47043 FPC 2.6.4 x86_64-linux-gtk 2
Can anyone else confirm this bug? And what could be the cause of this?
Kind regards,
Torsten Bonde Christiansen.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20141201/6f172785/attachment.html> -------------- next part --------------
program project1;
{$mode objfpc}{$H+}uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Interfaces, // this includes the LCL widgetset
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, ExtCtrls,
Buttons, StdCtrls, ComCtrls;{$R *.res}
var
F: TForm;
Fr: TFrame;
P: TPanel;
CloseBtn: TBitBtn;
PG: TPageControl;
TS: TTabSheet;
GB: TCustomGroupBox;
begin
RequireDerivedFormResource := True;
Application.Initialize;
Application.CreateForm(TForm, F);
P := TPanel.Create(F);
P.Align := alBottom;
P.Height := 48;
P.Parent := F;
CloseBtn := TBitBtn.Create(F);
CloseBtn.Kind := bkClose;
CloseBtn.Parent := P;
Fr := TFrame.Create(F);
PG := TPageControl.Create(Fr);
PG.Align := alClient;
PG.Parent := Fr;
TS := PG.AddTabSheet;
TS.Caption := 'tab1';
GB := TRadioGroup.Create(TS);
GB.Parent := TS;
GB.Top := 50;
GB.Visible := false;
GB := TGroupBox.Create(TS);
GB.Parent := TS;
GB.Top := 150;
GB.Visible := false;
GB := TCheckGroup.Create(TS);
GB.Parent := TS;
GB.Top := 250;
GB.Visible := false;
TS := PG.AddTabSheet;
TS.Caption := 'tab2';
Fr.Align := alClient;
Fr.Parent := F;
Application.Run;
end.