MessageComposer: Improved auto-sized layout revisited.

git-svn-id: trunk@62077 -
This commit is contained in:
wp 2019-10-18 20:29:59 +00:00
parent 5a8f370fce
commit a384c1ed14
2 changed files with 111 additions and 102 deletions

View File

@ -1,14 +1,14 @@
object FormMessagesComposer: TFormMessagesComposer
AnchorSideLeft.Side = asrBottom
Left = 658
Height = 683
Height = 539
Top = 123
Width = 627
Width = 580
ActiveControl = KindMessageComboBox
BorderIcons = [biSystemMenu]
Caption = 'Messages Composer'
ClientHeight = 683
ClientWidth = 627
ClientHeight = 539
ClientWidth = 580
OnCreate = MessagesInitExecute
OnShow = FormShow
Position = poScreenCenter
@ -40,7 +40,7 @@ object FormMessagesComposer: TFormMessagesComposer
object DlgTypeLabel: TLabel
AnchorSideLeft.Control = DlgTypeComboBox
AnchorSideTop.Control = CaptionLabel
Left = 164
Left = 152
Height = 15
Top = 64
Width = 42
@ -49,12 +49,13 @@ object FormMessagesComposer: TFormMessagesComposer
end
object HelpContextLabel: TLabel
AnchorSideLeft.Control = MsgMemo
AnchorSideTop.Control = HelpCtxBevel
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = HelpContextSpinEdit
Left = 8
Height = 15
Top = 300
Top = 281
Width = 70
Anchors = [akLeft, akBottom]
Caption = 'Help Context'
ParentColor = False
end
@ -65,7 +66,7 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideRight.Side = asrBottom
Left = 101
Height = 15
Top = 300
Top = 281
Width = 76
Caption = 'Help KeyWord'
ParentColor = False
@ -76,7 +77,7 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrCenter
Left = 8
Height = 15
Top = 260
Top = 241
Width = 7
Caption = 'X'
ParentColor = False
@ -88,7 +89,7 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrCenter
Left = 101
Height = 15
Top = 260
Top = 241
Width = 7
BorderSpacing.Left = 16
Caption = 'Y'
@ -96,12 +97,13 @@ object FormMessagesComposer: TFormMessagesComposer
end
object HelpFileNameLabel: TLabel
AnchorSideLeft.Control = MsgMemo
AnchorSideTop.Control = HelpContextSpinEdit
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = HelpFileNameEdit
Left = 8
Height = 15
Top = 347
Top = 328
Width = 78
Anchors = [akLeft, akBottom]
BorderSpacing.Top = 6
Caption = 'Help FileName'
ParentColor = False
@ -110,10 +112,12 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideLeft.Control = MsgMemo
AnchorSideTop.Control = Bevel2
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = PromptEdit
Left = 8
Height = 15
Top = 413
Top = 394
Width = 68
Anchors = [akLeft, akBottom]
Caption = 'PromptLabel'
ParentColor = False
end
@ -121,10 +125,12 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideLeft.Control = PromptEdit
AnchorSideTop.Control = PromptEdit
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = ValueEdit
Left = 8
Height = 15
Top = 466
Top = 447
Width = 55
Anchors = [akLeft, akBottom]
BorderSpacing.Top = 12
Caption = 'Value (var)'
ParentColor = False
@ -132,51 +138,51 @@ object FormMessagesComposer: TFormMessagesComposer
object DefaultValue: TLabel
AnchorSideLeft.Control = DefaultEdit
AnchorSideTop.Control = ValueLabel
Left = 164
Left = 152
Height = 15
Top = 466
Top = 447
Width = 38
Caption = 'Default'
ParentColor = False
end
object PositionBevel: TBevel
AnchorSideLeft.Control = MsgMemo
AnchorSideTop.Control = MsgMemo
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = MsgMemo
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = XSpinEdit
Left = 8
Height = 9
Top = 241
Width = 296
Anchors = [akTop, akLeft, akRight]
Top = 222
Width = 273
Anchors = [akLeft, akRight, akBottom]
Shape = bsTopLine
end
object Bevel2: TBevel
AnchorSideLeft.Control = MsgMemo
AnchorSideTop.Control = HelpFileNameEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = MsgMemo
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = PromptLabel
Left = 8
Height = 9
Top = 404
Width = 296
Anchors = [akTop, akLeft, akRight]
Top = 385
Width = 273
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Top = 16
Shape = bsTopLine
end
object HelpCtxBevel: TBevel
AnchorSideLeft.Control = MsgMemo
AnchorSideTop.Control = XSpinEdit
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = MsgMemo
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = HelpContextLabel
Left = 8
Height = 9
Top = 291
Width = 296
Anchors = [akTop, akLeft, akRight]
Top = 272
Width = 273
Anchors = [akLeft, akRight, akBottom]
Shape = bsTopLine
end
object KindMessageLabel: TLabel
@ -200,7 +206,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 8
Height = 23
Top = 82
Width = 140
Width = 128
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
TabOrder = 0
@ -211,10 +217,10 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = CaptionEdit
AnchorSideRight.Control = HCenterBevel
Left = 164
Left = 152
Height = 23
Top = 82
Width = 140
Width = 129
Anchors = [akTop, akLeft, akRight]
DropDownCount = 24
ItemHeight = 15
@ -232,31 +238,29 @@ object FormMessagesComposer: TFormMessagesComposer
end
object HelpContextSpinEdit: TSpinEdit
AnchorSideLeft.Control = HelpContextLabel
AnchorSideTop.Control = HelpContextLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = XSpinEdit
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = HelpFileNameLabel
Left = 8
Height = 23
Top = 318
Top = 299
Width = 77
Anchors = [akTop, akLeft, akRight]
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Top = 3
MaxValue = 9999
TabOrder = 2
end
object HelpKeyWordEdit: TEdit
AnchorSideLeft.Control = HelpKeyWordLabel
AnchorSideTop.Control = HelpKeyWordLabel
AnchorSideTop.Side = asrBottom
AnchorSideTop.Control = HelpContextSpinEdit
AnchorSideRight.Control = MsgMemo
AnchorSideRight.Side = asrBottom
Left = 101
Height = 23
Top = 318
Width = 203
Top = 299
Width = 180
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
TabOrder = 3
Text = 'HelpKeyWordEdit'
end
@ -265,10 +269,12 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = PositionBevel
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = HelpCtxBevel
Left = 19
Height = 23
Top = 256
Top = 237
Width = 66
Anchors = [akLeft, akBottom]
BorderSpacing.Left = 4
BorderSpacing.Top = 6
BorderSpacing.Bottom = 12
@ -281,41 +287,41 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrCenter
Left = 112
Height = 23
Top = 256
Top = 237
Width = 66
BorderSpacing.Left = 4
TabOrder = 5
end
object HelpFileNameEdit: TFileNameEdit
AnchorSideLeft.Control = MsgMemo
AnchorSideTop.Control = HelpFileNameLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = MsgMemo
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Bevel2
Left = 8
Height = 23
Top = 365
Width = 296
Top = 346
Width = 273
DialogOptions = []
FilterIndex = 0
HideDirectories = False
ButtonWidth = 23
NumGlyphs = 1
Anchors = [akTop, akLeft, akRight]
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Top = 3
MaxLength = 0
TabOrder = 6
end
object PromptEdit: TEdit
AnchorSideLeft.Control = PromptLabel
AnchorSideTop.Control = PromptLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = MaskInputCheckBox
AnchorSideBottom.Control = ValueLabel
Left = 8
Height = 23
Top = 431
Width = 204
Anchors = [akTop, akLeft, akRight]
Top = 412
Width = 181
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Top = 3
TabOrder = 7
Text = 'PromptEdit'
@ -325,9 +331,9 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = MsgMemo
AnchorSideRight.Side = asrBottom
Left = 228
Left = 205
Height = 19
Top = 433
Top = 414
Width = 76
Anchors = [akTop, akRight]
BorderSpacing.Left = 16
@ -336,14 +342,14 @@ object FormMessagesComposer: TFormMessagesComposer
end
object ValueEdit: TEdit
AnchorSideLeft.Control = ValueLabel
AnchorSideTop.Control = ValueLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = HCenterBevel1
AnchorSideBottom.Control = ButtonPanel
Left = 8
Height = 23
Top = 484
Width = 140
Anchors = [akTop, akLeft, akRight]
Top = 465
Width = 128
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.Top = 3
TabOrder = 9
Text = 'ValueEdit'
@ -351,34 +357,34 @@ object FormMessagesComposer: TFormMessagesComposer
object DefaultEdit: TEdit
AnchorSideLeft.Control = HCenterBevel1
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = DefaultValue
AnchorSideTop.Side = asrBottom
AnchorSideTop.Control = ValueEdit
AnchorSideRight.Control = MsgMemo
AnchorSideRight.Side = asrBottom
Left = 164
Left = 152
Height = 23
Top = 484
Width = 140
Top = 465
Width = 129
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
TabOrder = 10
Text = 'DefaultEdit'
end
object SourceWrapperGroupBox: TGroupBox
AnchorSideLeft.Control = ButtonsNotebook
AnchorSideTop.Control = HelpContextLabel
AnchorSideTop.Control = ButtonsNotebook
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ButtonsNotebook
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = DefaultEdit
AnchorSideBottom.Side = asrBottom
Left = 323
Height = 207
Top = 300
Width = 296
Left = 300
Height = 243
Top = 245
Width = 272
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 16
Caption = 'SourceWrapperGroupBox'
ClientHeight = 187
ClientWidth = 292
ClientHeight = 223
ClientWidth = 268
TabOrder = 12
object IfThenRadioButton: TRadioButton
AnchorSideLeft.Control = SourceWrapperGroupBox
@ -434,23 +440,27 @@ object FormMessagesComposer: TFormMessagesComposer
TabOrder = 3
end
object BeginEndCheckBox: TCheckBox
Left = 9
AnchorSideLeft.Control = IfThenRadioButton
AnchorSideTop.Control = IfThenElseRadioButton
AnchorSideTop.Side = asrBottom
Left = 8
Height = 19
Top = 56
Top = 54
Width = 85
BorderSpacing.Top = 6
Caption = 'begin ... end'
TabOrder = 4
end
object SourceNotebook: TNotebook
AnchorSideLeft.Control = SourceWrapperGroupBox
AnchorSideTop.Control = IfThenElseRadioButton
AnchorSideTop.Control = BeginEndCheckBox
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = SourceWrapperGroupBox
AnchorSideRight.Side = asrBottom
Left = 8
Height = 131
Top = 56
Width = 276
Height = 142
Top = 81
Width = 252
PageIndex = 0
Align = alBottom
Anchors = [akTop, akLeft, akRight, akBottom]
@ -479,7 +489,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 0
Height = 23
Top = 18
Width = 276
Width = 252
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
DropDownCount = 24
@ -503,7 +513,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 0
Height = 51
Top = 0
Width = 276
Width = 271
Anchors = [akTop, akLeft, akRight]
AutoFill = True
AutoSize = True
@ -516,8 +526,8 @@ object FormMessagesComposer: TFormMessagesComposer
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 3
ClientHeight = 31
ClientWidth = 272
ClientHeight = 51
ClientWidth = 271
Columns = 3
Items.Strings = (
'mbOK'
@ -550,7 +560,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 0
Height = 23
Top = 26
Width = 246
Width = 252
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 3
TabOrder = 0
@ -568,7 +578,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 8
Height = 23
Top = 25
Width = 611
Width = 564
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Top = 4
BorderSpacing.Right = 8
@ -586,11 +596,12 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Control = MsgLabel
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = HCenterBevel
AnchorSideBottom.Control = PositionBevel
Left = 8
Height = 94
Height = 75
Top = 135
Width = 296
Anchors = [akTop, akLeft, akRight]
Width = 273
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 3
BorderSpacing.Bottom = 12
Lines.Strings = (
@ -608,14 +619,13 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Control = CaptionLabel
AnchorSideRight.Control = KindMessageComboBox
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = MsgMemo
AnchorSideBottom.Side = asrBottom
Left = 323
Left = 300
Height = 165
Top = 64
Width = 296
Width = 272
PageIndex = 0
Anchors = [akTop, akLeft, akRight, akBottom]
Anchors = [akTop, akLeft, akRight]
TabOrder = 13
TabStop = True
object Page1: TPage
@ -624,7 +634,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 0
Height = 165
Top = 0
Width = 296
Width = 272
Align = alClient
AutoFill = True
Caption = 'BUTTONS (TMsgDlgButtons)'
@ -637,7 +647,7 @@ object FormMessagesComposer: TFormMessagesComposer
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
ClientHeight = 145
ClientWidth = 292
ClientWidth = 268
Columns = 2
Items.Strings = (
'mbYes'
@ -773,16 +783,18 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 0
Height = 43
Top = 523
Width = 627
Anchors = [akTop, akLeft, akRight]
Top = 496
Width = 580
Anchors = [akLeft, akRight, akBottom]
AutoSize = True
BorderSpacing.Top = 16
BorderSpacing.Top = 8
BevelOuter = bvNone
ClientHeight = 43
ClientWidth = 627
ClientWidth = 580
TabOrder = 15
object TestButton: TButton
AnchorSideLeft.Control = ButtonPanel
@ -803,7 +815,7 @@ object FormMessagesComposer: TFormMessagesComposer
object OkButton: TBitBtn
AnchorSideTop.Control = CancelButton
AnchorSideRight.Control = CancelButton
Left = 467
Left = 420
Height = 26
Top = 9
Width = 62
@ -822,7 +834,7 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = ButtonPanel
AnchorSideRight.Side = asrBottom
Left = 537
Left = 490
Height = 26
Top = 9
Width = 82
@ -844,7 +856,7 @@ object FormMessagesComposer: TFormMessagesComposer
Left = 4
Height = 9
Top = 0
Width = 619
Width = 572
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 4
BorderSpacing.Right = 4
@ -854,7 +866,7 @@ object FormMessagesComposer: TFormMessagesComposer
object HCenterBevel: TBevel
AnchorSideLeft.Control = Owner
AnchorSideLeft.Side = asrCenter
Left = 304
Left = 281
Height = 50
Top = 7
Width = 19
@ -863,7 +875,7 @@ object FormMessagesComposer: TFormMessagesComposer
object HCenterBevel1: TBevel
AnchorSideLeft.Control = MsgMemo
AnchorSideLeft.Side = asrCenter
Left = 148
Left = 136
Height = 41
Top = 478
Width = 16

View File

@ -325,9 +325,6 @@ end;
procedure TFormMessagesComposer.FormShow(Sender: TObject);
begin
ClientHeight := ButtonPanel.Top + ButtonPanel.Height;
Constraints.MinHeight := ClientHeight;
Constraints.MaxHeight := ClientHeight;
OKButton.Constraints.MinWidth := CancelButton.Width;
TestButton.Constraints.MinWidth := CancelButton.Width;
end;