IDEIntf: improved New Field dialog layout, issue #39303

This commit is contained in:
Maxim Ganetsky 2021-08-04 01:45:53 +03:00
parent c223d7fe95
commit 6e3058da02
2 changed files with 152 additions and 116 deletions

View File

@ -1,23 +1,31 @@
object NewFieldFrm: TNewFieldFrm
Left = 447
Height = 461
Height = 493
Top = 271
Width = 510
Width = 600
HorzScrollBar.Page = 261
VertScrollBar.Page = 375
AutoSize = True
Caption = 'Dialog'
ClientHeight = 461
ClientWidth = 510
ClientHeight = 493
ClientWidth = 600
Constraints.MinWidth = 600
DesignTimePPI = 120
OnClose = FormClose
OnCreate = FormCreate
ParentFont = True
Position = poScreenCenter
LCLVersion = '2.1.0.0'
object ButtonPanel1: TButtonPanel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = GroupBox2
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 42
Top = 413
Width = 498
Height = 30
Top = 457
Width = 588
Align = alNone
Anchors = [akTop, akLeft, akRight]
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
@ -28,15 +36,21 @@ object NewFieldFrm: TNewFieldFrm
CancelButton.DefaultCaption = True
TabOrder = 0
ShowButtons = [pbOK, pbCancel]
ShowBevel = False
end
object RadioGroup1: TRadioGroup
Left = 0
Height = 55
Top = 0
Width = 510
AnchorSideRight.Side = asrBottom
Left = 6
Height = 73
Top = 6
Width = 588
Align = alTop
AutoFill = True
AutoSize = True
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
BorderSpacing.InnerBorder = 6
Caption = 'Field Type'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
@ -46,8 +60,8 @@ object NewFieldFrm: TNewFieldFrm
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 3
ClientHeight = 35
ClientWidth = 508
ClientHeight = 48
ClientWidth = 584
Columns = 3
ItemIndex = 0
Items.Strings = (
@ -56,74 +70,86 @@ object NewFieldFrm: TNewFieldFrm
'&Lookup'
)
OnClick = RadioGroup1Click
ParentFont = False
TabOrder = 1
end
object NoteLbl: TLabel
Left = 0
Height = 19
Top = 55
Width = 510
Align = alTop
AnchorSideLeft.Control = RadioGroup1
AnchorSideTop.Control = RadioGroup1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = RadioGroup1
AnchorSideRight.Side = asrBottom
Left = 6
Height = 20
Top = 85
Width = 588
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
Caption = 'NoteLbl'
ParentColor = False
ParentFont = False
Visible = False
WordWrap = True
end
object GroupBox1: TGroupBox
AnchorSideLeft.Control = RadioGroup1
AnchorSideTop.Control = NoteLbl
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = RadioGroup1
AnchorSideRight.Side = asrBottom
Left = 0
Height = 170
Top = 248
Width = 510
Align = alTop
Left = 6
Height = 167
Top = 111
Width = 588
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
BorderSpacing.InnerBorder = 6
Caption = 'Field properties'
ClientHeight = 150
ClientWidth = 508
ClientHeight = 142
ClientWidth = 584
ParentFont = False
TabOrder = 2
object Label1: TLabel
AnchorSideLeft.Control = GroupBox1
AnchorSideBottom.Control = EditName
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 19
Top = 18
Width = 44
Height = 20
Top = 8
Width = 43
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = '&Name:'
FocusControl = EditName
ParentColor = False
ParentFont = False
end
object Label2: TLabel
AnchorSideLeft.Control = GroupBox1
AnchorSideBottom.Control = SelectType
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 19
Top = 88
Width = 36
Height = 20
Top = 76
Width = 34
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = '&Type:'
FocusControl = SelectType
ParentColor = False
ParentFont = False
end
object Label3: TLabel
AnchorSideLeft.Control = GroupBox1
AnchorSideRight.Control = Label8
AnchorSideBottom.Control = EditSize
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 19
Top = 125
Width = 32
Height = 20
Top = 110
Width = 30
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
BorderSpacing.Right = 6
Caption = '&Size:'
FocusControl = EditSize
ParentColor = False
ParentFont = False
end
object EditName: TEdit
AnchorSideLeft.Control = Label8
@ -131,14 +157,14 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideTop.Control = GroupBox1
AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom
Left = 255
Height = 31
Top = 6
Width = 247
Left = 293
Height = 28
Top = 0
Width = 285
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
OnChange = EditNameChange
ParentFont = False
ParentShowHint = False
ShowHint = True
TabOrder = 0
@ -150,14 +176,14 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom
Left = 255
Height = 27
Top = 80
Width = 247
Left = 293
Height = 28
Top = 68
Width = 285
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
ItemHeight = 0
ItemHeight = 20
Items.Strings = (
'String'
'Integer'
@ -175,6 +201,7 @@ object NewFieldFrm: TNewFieldFrm
'LargeInt'
)
OnChange = SelectTypeChange
ParentFont = False
Style = csDropDownList
TabOrder = 2
end
@ -185,16 +212,16 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom
Left = 255
Height = 31
Top = 113
Width = 247
Left = 293
Height = 28
Top = 102
Width = 285
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Color = clBtnFace
Enabled = False
ParentFont = False
TabOrder = 3
end
object Label7: TLabel
@ -202,14 +229,14 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideBottom.Control = EditCompName
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 19
Top = 55
Width = 123
Height = 20
Top = 42
Width = 125
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = 'Co&mponent Name:'
FocusControl = EditCompName
ParentColor = False
ParentFont = False
end
object EditCompName: TEdit
AnchorSideLeft.Control = Label8
@ -218,14 +245,15 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox1
AnchorSideRight.Side = asrBottom
Left = 255
Height = 31
Top = 43
Width = 247
Left = 293
Height = 28
Top = 34
Width = 285
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
OnChange = EditCompNameChange
ParentFont = False
ParentShowHint = False
ShowHint = True
TabOrder = 1
@ -234,78 +262,86 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideLeft.Control = GroupBox1
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GroupBox1
Left = 254
Left = 292
Height = 1
Top = 0
Width = 1
ParentColor = False
ParentFont = False
end
end
object GroupBox2: TGroupBox
Left = 0
Height = 174
Top = 74
Width = 510
Align = alTop
AnchorSideLeft.Control = RadioGroup1
AnchorSideTop.Control = GroupBox1
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = RadioGroup1
AnchorSideRight.Side = asrBottom
Left = 6
Height = 167
Top = 284
Width = 588
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 6
BorderSpacing.InnerBorder = 6
Caption = 'Lookup definition'
ClientHeight = 154
ClientWidth = 508
ClientHeight = 142
ClientWidth = 584
ParentFont = False
TabOrder = 3
object Label4: TLabel
AnchorSideLeft.Control = GroupBox2
AnchorSideBottom.Control = SelectKeyFields
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 19
Top = 18
Width = 63
Height = 20
Top = 8
Width = 64
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = '&Key fields'
FocusControl = SelectKeyFields
ParentColor = False
ParentFont = False
end
object Label5: TLabel
AnchorSideLeft.Control = GroupBox2
AnchorSideBottom.Control = SelectLookupKeys
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 19
Top = 92
Width = 79
Height = 20
Top = 76
Width = 81
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = 'L&ookup keys'
FocusControl = SelectLookupKeys
ParentColor = False
ParentFont = False
end
object Label6: TLabel
AnchorSideLeft.Control = GroupBox2
AnchorSideBottom.Control = SelectResultField
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 19
Top = 129
Width = 84
Height = 20
Top = 110
Width = 82
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = '&Result Fields'
FocusControl = SelectResultField
ParentColor = False
ParentFont = False
end
object Label10: TLabel
AnchorSideLeft.Control = GroupBox2
AnchorSideBottom.Control = DataSetsCombo
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 19
Top = 55
Width = 52
Height = 20
Top = 42
Width = 51
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 6
Caption = 'Dataset'
ParentColor = False
ParentFont = False
end
object SelectKeyFields: TComboBox
AnchorSideLeft.Control = Label9
@ -313,15 +349,15 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideTop.Control = GroupBox2
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
Left = 255
Height = 31
Top = 6
Width = 247
Left = 293
Height = 28
Top = 0
Width = 285
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
ItemHeight = 0
ItemHeight = 20
OnChange = SelectKeyFieldsChange
ParentFont = False
ParentShowHint = False
ShowHint = True
TabOrder = 0
@ -332,16 +368,17 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
Left = 255
Height = 31
Top = 80
Width = 247
Left = 293
Height = 28
Top = 68
Width = 285
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
Enabled = False
ItemHeight = 0
ItemHeight = 20
OnChange = SelectLookupKeysChange
ParentFont = False
TabOrder = 2
end
object SelectResultField: TComboBox
@ -350,17 +387,17 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
Left = 254
Height = 31
Top = 117
Width = 248
Left = 292
Height = 28
Top = 102
Width = 286
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Enabled = False
ItemHeight = 0
ItemHeight = 20
OnChange = SelectResultFieldChange
ParentFont = False
TabOrder = 3
end
object DataSetsCombo: TComboBox
@ -370,15 +407,16 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = GroupBox2
AnchorSideRight.Side = asrBottom
Left = 255
Height = 31
Top = 43
Width = 247
Left = 293
Height = 28
Top = 34
Width = 285
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 6
BorderSpacing.Right = 6
ItemHeight = 0
ItemHeight = 20
OnChange = DataSetsComboChange
ParentFont = False
ParentShowHint = False
ShowHint = True
Style = csDropDownList
@ -388,11 +426,11 @@ object NewFieldFrm: TNewFieldFrm
AnchorSideLeft.Control = GroupBox2
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = GroupBox2
Left = 254
Left = 292
Height = 1
Top = 0
Width = 1
ParentColor = False
ParentFont = False
end
end
end

View File

@ -352,12 +352,10 @@ begin
0..1: begin //data,calculated field
GroupBox2.Visible := False;
GroupBox1.Visible := True;
ClientHeight := RadioGroup1.Height + NoteLbl.Height + GroupBox1.Height + ButtonPanel1.Height;
end;
2: begin //lookup field
GroupBox2.Visible := True;
GroupBox1.Visible := False;
ClientHeight := RadioGroup1.Height + NoteLbl.Height + GroupBox2.Height + ButtonPanel1.Height;
end;
end;
SetButtons;