LazStats: Remove cancel button from KR21Unit. Add its help text to chm.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7391 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2020-04-18 21:19:03 +00:00
parent 8786e8a9fa
commit bf920008ff
4 changed files with 51 additions and 57 deletions

View File

@ -15,10 +15,10 @@ object KR21Frm: TKR21Frm
object ResetBtn: TButton
AnchorSideTop.Control = Bevel1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = CancelBtn
Left = 4
AnchorSideRight.Control = ComputeBtn
Left = 80
Height = 25
Top = 128
Top = 140
Width = 54
Anchors = [akTop, akRight]
AutoSize = True
@ -30,31 +30,13 @@ object KR21Frm: TKR21Frm
OnClick = ResetBtnClick
TabOrder = 1
end
object CancelBtn: TButton
AnchorSideTop.Control = Bevel1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ComputeBtn
Left = 66
Height = 25
Top = 128
Width = 62
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
end
object ComputeBtn: TButton
AnchorSideTop.Control = Bevel1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ReturnBtn
Left = 136
AnchorSideRight.Control = CloseBtn
Left = 142
Height = 25
Top = 128
Top = 140
Width = 76
Anchors = [akTop, akRight]
AutoSize = True
@ -64,26 +46,26 @@ object KR21Frm: TKR21Frm
BorderSpacing.Bottom = 8
Caption = 'Compute'
OnClick = ComputeBtnClick
TabOrder = 3
TabOrder = 2
end
object ReturnBtn: TButton
object CloseBtn: TButton
AnchorSideTop.Control = Bevel1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 220
Left = 226
Height = 25
Top = 128
Width = 61
Top = 140
Width = 55
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Bottom = 8
Caption = 'Return'
ModalResult = 1
TabOrder = 4
Caption = 'Close'
ModalResult = 11
TabOrder = 3
end
object Bevel1: TBevel
AnchorSideLeft.Control = Owner
@ -91,10 +73,10 @@ object KR21Frm: TKR21Frm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = ReturnBtn
AnchorSideBottom.Control = CloseBtn
Left = 0
Height = 8
Top = 112
Top = 124
Width = 289
Anchors = [akTop, akLeft, akRight]
Shape = bsBottomLine
@ -104,15 +86,15 @@ object KR21Frm: TKR21Frm
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = Owner
Left = 34
Height = 104
Height = 116
Top = 8
Width = 221
AutoSize = True
BorderSpacing.Left = 8
BorderSpacing.Left = 16
BorderSpacing.Top = 8
BorderSpacing.Right = 8
BorderSpacing.Right = 16
BevelOuter = bvNone
ClientHeight = 104
ClientHeight = 116
ClientWidth = 221
TabOrder = 0
object Label1: TLabel
@ -160,7 +142,7 @@ object KR21Frm: TKR21Frm
AnchorSideRight.Control = RelEdit
Left = 0
Height = 15
Top = 85
Top = 97
Width = 138
Anchors = [akTop, akRight]
BorderSpacing.Right = 8
@ -214,13 +196,13 @@ object KR21Frm: TKR21Frm
end
object RelEdit: TEdit
AnchorSideLeft.Control = NoItemsEdit
AnchorSideTop.Control = StdDevEdit
AnchorSideTop.Control = Bevel2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 146
Height = 23
Top = 81
Top = 93
Width = 75
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
@ -230,5 +212,19 @@ object KR21Frm: TKR21Frm
ReadOnly = True
TabOrder = 3
end
object Bevel2: TBevel
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = StdDevEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 0
Height = 4
Top = 85
Width = 221
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 8
Shape = bsTopLine
end
end
end

View File

@ -14,11 +14,11 @@ type
TKR21Frm = class(TForm)
Bevel1: TBevel;
Bevel2: TBevel;
Panel1: TPanel;
ResetBtn: TButton;
CancelBtn: TButton;
ComputeBtn: TButton;
ReturnBtn: TButton;
CloseBtn: TButton;
NoItemsEdit: TEdit;
MeanEdit: TEdit;
StdDevEdit: TEdit;
@ -59,11 +59,10 @@ procedure TKR21Frm.FormActivate(Sender: TObject);
var
w: Integer;
begin
w := MaxValue([ResetBtn.Width, CancelBtn.Width, ComputeBtn.Width, ReturnBtn.Width]);
w := MaxValue([ResetBtn.Width, ComputeBtn.Width, CloseBtn.Width]);
ResetBtn.Constraints.MinWidth := w;
CancelBtn.Constraints.MinWidth := w;
ComputeBtn.Constraints.MinWidth := w;
ReturnBtn.Constraints.MinWidth := w;
CloseBtn.Constraints.MinWidth := w;
end;
procedure TKR21Frm.FormShow(Sender: TObject);
@ -78,9 +77,8 @@ begin
items := StrToFloat(NoItemsEdit.Text);
mean := StrToFloat(MeanEdit.Text);
stddev := StrToFloat(StdDevEdit.Text);
rel := (items / (items - 1.0)) * (1.0 - (mean * (items - mean))/
(items * sqr(stddev)));
RelEdit.Text := FormatFloat('0.00000', rel); //FloatToStr(rel);
rel := (items / (items - 1.0)) * (1.0 - (mean * (items - mean))/(items * sqr(stddev)));
RelEdit.Text := FormatFloat('0.00000', rel);
end;
initialization