mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-26 07:30:44 +01:00
LCL: TCalendarDialog: enabled AutoSize, bug #16305
git-svn-id: trunk@24782 -
This commit is contained in:
parent
612e69dc4a
commit
4135aa5ec6
@ -197,7 +197,8 @@ function CreateCalculatorForm(AOwner: TComponent; ALayout : TCalculatorLayout; A
|
||||
|
||||
|
||||
Type
|
||||
{ TCalendarDialog }
|
||||
{ TCalendarDialog }
|
||||
|
||||
TCalendarDialog = class(TCommonDialog)
|
||||
private
|
||||
FDate: TDateTime;
|
||||
@ -1274,12 +1275,14 @@ var DF:TForm;
|
||||
okButton,cancelButton:TButton;
|
||||
panel:TPanel;
|
||||
begin
|
||||
DF:=TForm.Create(Self.Owner); // Self.Owner, so that poOwnerFormCenter works
|
||||
DF:=TForm(TForm.NewInstance);
|
||||
DF.DisableAlign;
|
||||
DF.Create(Self.Owner); // Self.Owner, so that poOwnerFormCenter works
|
||||
DF.Caption:=DialogTitle;
|
||||
DF.Position:=DialogPosition;
|
||||
DF.BorderStyle:=bsDialog;
|
||||
DF.AutoScroll:=false;
|
||||
//DF.AutoSize:=true;
|
||||
DF.AutoSize:=true;
|
||||
|
||||
FCalendar:=TCalendar.Create(DF);
|
||||
with FCalendar do begin
|
||||
@ -1329,6 +1332,7 @@ begin
|
||||
DF.ClientWidth := FCalendar.Width;
|
||||
DF.ClientHeight := panel.Top+panel.Height;
|
||||
|
||||
DF.EnableAlign;
|
||||
Result:=DF.ShowModal=mrOK;
|
||||
FreeAndNil(DF);
|
||||
end;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user