You've already forked lazarus-ccr
LazStats: Store position of non-modal form if opened multiple times.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7675 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -51,6 +51,7 @@ type
|
||||
FGroupsNeeded: Boolean;
|
||||
|
||||
protected
|
||||
FAutoSized: Boolean;
|
||||
GrpVar: Integer;
|
||||
MeasVar: Integer;
|
||||
procedure Compute; virtual;
|
||||
@ -145,6 +146,9 @@ procedure TBasicSPCForm.FormActivate(Sender: TObject);
|
||||
var
|
||||
w: Integer;
|
||||
begin
|
||||
if FAutoSized then
|
||||
exit;
|
||||
|
||||
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
|
||||
HelpBtn.Constraints.MinWidth := w;
|
||||
ResetBtn.Constraints.MinWidth := w;
|
||||
@ -156,6 +160,9 @@ begin
|
||||
CloseBtn.Left + CloseBtn.Width - HelpBtn.Left + HelpBtn.BorderSpacing.Around
|
||||
);
|
||||
Constraints.MinHeight := MeasEdit.Top + MeasEdit.Height + MeasEdit.BorderSpacing.Bottom + ButtonPanel.Height;
|
||||
|
||||
Position := poDesigned;
|
||||
FAutoSized := true;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -33,7 +33,7 @@ inherited CChartForm: TCChartForm
|
||||
end
|
||||
inherited VarList: TListBox
|
||||
Height = 345
|
||||
Width = 192
|
||||
Width = 200
|
||||
end
|
||||
inherited GroupLabel: TLabel
|
||||
Left = 240
|
||||
@ -122,4 +122,13 @@ inherited CChartForm: TCChartForm
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited SpecsSplitter: TSplitter
|
||||
Left = 451
|
||||
Height = 420
|
||||
end
|
||||
inherited PageControl: TPageControl
|
||||
Left = 459
|
||||
Height = 408
|
||||
Width = 462
|
||||
end
|
||||
end
|
||||
|
@ -111,6 +111,9 @@ procedure TCChartForm.FormActivate(Sender: TObject);
|
||||
var
|
||||
w: Integer;
|
||||
begin
|
||||
if FAutoSized then
|
||||
exit;
|
||||
|
||||
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
|
||||
HelpBtn.Constraints.MinWidth := w;
|
||||
ResetBtn.Constraints.MinWidth := w;
|
||||
@ -132,6 +135,9 @@ begin
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
end;
|
||||
|
||||
Position := poDesigned;
|
||||
FAutoSized := true;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -350,6 +350,9 @@ procedure TCUSUMChartForm.FormActivate(Sender: TObject);
|
||||
var
|
||||
w: Integer;
|
||||
begin
|
||||
if FAutoSized then
|
||||
exit;
|
||||
|
||||
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
|
||||
HelpBtn.Constraints.MinWidth := w;
|
||||
ResetBtn.Constraints.MinWidth := w;
|
||||
@ -375,6 +378,9 @@ begin
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
end;
|
||||
|
||||
Position := poDesigned;
|
||||
FAutoSized := true;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -29,7 +29,7 @@ inherited PChartForm: TPChartForm
|
||||
end
|
||||
end
|
||||
inherited VarList: TListBox
|
||||
Width = 200
|
||||
Width = 208
|
||||
end
|
||||
inherited GroupLabel: TLabel
|
||||
Left = 248
|
||||
@ -175,4 +175,11 @@ inherited PChartForm: TPChartForm
|
||||
end
|
||||
end
|
||||
end
|
||||
inherited SpecsSplitter: TSplitter
|
||||
Left = 467
|
||||
end
|
||||
inherited PageControl: TPageControl
|
||||
Left = 475
|
||||
Width = 446
|
||||
end
|
||||
end
|
||||
|
@ -124,6 +124,9 @@ procedure TPChartForm.FormActivate(Sender: TObject);
|
||||
var
|
||||
w: Integer;
|
||||
begin
|
||||
if FAutoSized then
|
||||
exit;
|
||||
|
||||
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
|
||||
HelpBtn.Constraints.MinWidth := w;
|
||||
ResetBtn.Constraints.MinWidth := w;
|
||||
@ -145,6 +148,9 @@ begin
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
end;
|
||||
|
||||
Position := poDesigned;
|
||||
FAutoSized := true;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -116,6 +116,9 @@ procedure TUChartForm.FormActivate(Sender: TObject);
|
||||
var
|
||||
w: Integer;
|
||||
begin
|
||||
if FAutoSized then
|
||||
exit;
|
||||
|
||||
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
|
||||
HelpBtn.Constraints.MinWidth := w;
|
||||
ResetBtn.Constraints.MinWidth := w;
|
||||
@ -137,6 +140,9 @@ begin
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
end;
|
||||
|
||||
Position := poDesigned;
|
||||
FAutoSized := true;
|
||||
end;
|
||||
|
||||
|
||||
|
@ -236,4 +236,9 @@ inherited XBarChartForm: TXBarChartForm
|
||||
Left = 390
|
||||
Height = 476
|
||||
end
|
||||
inherited PageControl: TPageControl
|
||||
Left = 398
|
||||
Height = 464
|
||||
Width = 523
|
||||
end
|
||||
end
|
||||
|
@ -23,7 +23,7 @@ interface
|
||||
|
||||
uses
|
||||
Classes, SysUtils, Forms, Controls, Graphics, Dialogs, ComCtrls,
|
||||
ExtCtrls, StdCtrls, Buttons, PrintersDlgs,
|
||||
ExtCtrls, StdCtrls, Buttons,
|
||||
Globals, BasicSPCUnit;
|
||||
|
||||
type
|
||||
@ -61,7 +61,7 @@ implementation
|
||||
|
||||
uses
|
||||
Math,
|
||||
Utils, MathUnit, MainUnit, DataProcs;
|
||||
Utils, MainUnit, DataProcs;
|
||||
|
||||
{$R *.lfm}
|
||||
|
||||
@ -69,6 +69,9 @@ procedure TXBarChartForm.FormActivate(Sender: TObject);
|
||||
var
|
||||
w: Integer;
|
||||
begin
|
||||
if FAutoSized then
|
||||
exit;
|
||||
|
||||
w := MaxValue([HelpBtn.Width, ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
|
||||
HelpBtn.Constraints.MinWidth := w;
|
||||
ResetBtn.Constraints.MinWidth := w;
|
||||
@ -93,6 +96,9 @@ begin
|
||||
finally
|
||||
EnableAutoSizing;
|
||||
end;
|
||||
|
||||
Position := poDesigned;
|
||||
FAutoSized := true;
|
||||
end;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user