MessageComposer: Improved Layout

git-svn-id: trunk@36017 -
This commit is contained in:
martin 2012-03-14 23:29:59 +00:00
parent 6cf24989e8
commit 1575cf7405
2 changed files with 435 additions and 388 deletions

View File

@ -1,22 +1,22 @@
object FormMessagesComposer: TFormMessagesComposer object FormMessagesComposer: TFormMessagesComposer
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
Left = 650 Left = 650
Height = 552 Height = 591
Top = 195 Top = 195
Width = 822 Width = 584
BorderIcons = [biSystemMenu] BorderIcons = [biSystemMenu]
BorderStyle = bsDialog BorderStyle = bsDialog
Caption = 'Messages Composer' Caption = 'Messages Composer'
ClientHeight = 552 ClientHeight = 591
ClientWidth = 822 ClientWidth = 584
OnCreate = MessagesInitExecute OnCreate = MessagesInitExecute
Position = poScreenCenter Position = poScreenCenter
LCLVersion = '0.9.29' LCLVersion = '0.9.31'
object CaptionLabel: TLabel object CaptionLabel: TLabel
Left = 6 Left = 6
Height = 14 Height = 16
Top = 70 Top = 70
Width = 63 Width = 71
Caption = 'CaptionLabel' Caption = 'CaptionLabel'
ParentColor = False ParentColor = False
end end
@ -24,18 +24,18 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Control = CaptionEdit AnchorSideTop.Control = CaptionEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 14 Height = 16
Top = 120 Top = 124
Width = 45 Width = 52
BorderSpacing.Top = 12 BorderSpacing.Top = 12
Caption = 'MsgLabel' Caption = 'MsgLabel'
ParentColor = False ParentColor = False
end end
object DlgTypeLabel: TLabel object DlgTypeLabel: TLabel
Left = 154 Left = 154
Height = 14 Height = 16
Top = 70 Top = 70
Width = 40 Width = 45
Caption = 'DlgType' Caption = 'DlgType'
ParentColor = False ParentColor = False
end end
@ -43,9 +43,9 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Control = HelpCtxBevel AnchorSideTop.Control = HelpCtxBevel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 14 Height = 16
Top = 294 Top = 296
Width = 64 Width = 70
Caption = 'Help Context' Caption = 'Help Context'
ParentColor = False ParentColor = False
end end
@ -53,9 +53,9 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Control = HelpContextLabel AnchorSideTop.Control = HelpContextLabel
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 103 Left = 103
Height = 14 Height = 16
Top = 294 Top = 296
Width = 69 Width = 77
Caption = 'Help KeyWord' Caption = 'Help KeyWord'
ParentColor = False ParentColor = False
end end
@ -63,9 +63,9 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Control = XSpinEdit AnchorSideTop.Control = XSpinEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 6 Left = 6
Height = 14 Height = 16
Top = 258 Top = 261
Width = 7 Width = 8
Caption = 'X' Caption = 'X'
ParentColor = False ParentColor = False
end end
@ -74,10 +74,10 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = YSpinEdit AnchorSideTop.Control = YSpinEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 91 Left = 92
Height = 14 Height = 16
Top = 258 Top = 261
Width = 7 Width = 8
BorderSpacing.Left = 8 BorderSpacing.Left = 8
Caption = 'Y' Caption = 'Y'
ParentColor = False ParentColor = False
@ -86,34 +86,34 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Control = HelpContextSpinEdit AnchorSideTop.Control = HelpContextSpinEdit
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 14 Height = 16
Top = 344 Top = 344
Width = 68 Width = 79
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Caption = 'Help FileName' Caption = 'Help FileName'
ParentColor = False ParentColor = False
end end
object PromptLabel: TLabel object PromptLabel: TLabel
Left = 16 Left = 16
Height = 14 Height = 16
Top = 425 Top = 425
Width = 60 Width = 69
Caption = 'PromptLabel' Caption = 'PromptLabel'
ParentColor = False ParentColor = False
end end
object ValueLabel: TLabel object ValueLabel: TLabel
Left = 16 Left = 16
Height = 14 Height = 16
Top = 478 Top = 478
Width = 54 Width = 57
Caption = 'Value (var)' Caption = 'Value (var)'
ParentColor = False ParentColor = False
end end
object DefaultValue: TLabel object DefaultValue: TLabel
Left = 138 Left = 138
Height = 14 Height = 16
Top = 478 Top = 478
Width = 36 Width = 39
Caption = 'Default' Caption = 'Default'
ParentColor = False ParentColor = False
end end
@ -122,7 +122,7 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 5 Left = 5
Height = 9 Height = 9
Top = 237 Top = 243
Width = 269 Width = 269
BorderSpacing.Top = 6 BorderSpacing.Top = 6
Shape = bsTopLine Shape = bsTopLine
@ -139,15 +139,15 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 9 Height = 9
Top = 285 Top = 287
Width = 266 Width = 266
Shape = bsTopLine Shape = bsTopLine
end end
object KindMessageLabel: TLabel object KindMessageLabel: TLabel
Left = 6 Left = 6
Height = 14 Height = 16
Top = 6 Top = 6
Width = 810 Width = 572
Align = alTop Align = alTop
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 6 BorderSpacing.Top = 6
@ -159,8 +159,8 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Control = CaptionLabel AnchorSideTop.Control = CaptionLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 21 Height = 23
Top = 87 Top = 89
Width = 136 Width = 136
BorderSpacing.Top = 3 BorderSpacing.Top = 3
TabOrder = 0 TabOrder = 0
@ -170,11 +170,11 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Control = DlgTypeLabel AnchorSideTop.Control = DlgTypeLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 154 Left = 154
Height = 21 Height = 23
Top = 87 Top = 89
Width = 120 Width = 120
BorderSpacing.Top = 3 BorderSpacing.Top = 3
ItemHeight = 13 ItemHeight = 15
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'mtWarning' 'mtWarning'
@ -187,182 +187,60 @@ object FormMessagesComposer: TFormMessagesComposer
TabOrder = 1 TabOrder = 1
Text = 'mtWarning' Text = 'mtWarning'
end end
object ButtonsCheckGroup: TCheckGroup
Left = 285
Height = 177
Top = 70
Width = 216
AutoFill = True
Caption = 'BUTTONS (TMsgDlgButtons)'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
Columns = 2
Items.Strings = (
'mbYes'
'mbNo'
'mbOK'
'mbCancel'
'mbAbort'
'mbRetry'
'mbIgnore'
'mbAll'
'mbNoToAll'
'mbYesToAll'
'mbHelp'
'mbClose'
)
OnItemClick = ButtonsCheckGroupItemClick
TabOrder = 2
Data = {
0C000000020203030202020202020202
}
end
object HelpContextSpinEdit: TSpinEdit object HelpContextSpinEdit: TSpinEdit
AnchorSideTop.Control = HelpContextLabel AnchorSideTop.Control = HelpContextLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 27 Height = 23
Top = 311 Top = 315
Width = 61 Width = 61
BorderSpacing.Top = 3 BorderSpacing.Top = 3
MaxValue = 9999 MaxValue = 9999
TabOrder = 3 TabOrder = 2
end end
object HelpKeyWordEdit: TEdit object HelpKeyWordEdit: TEdit
AnchorSideTop.Control = HelpKeyWordLabel AnchorSideTop.Control = HelpKeyWordLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 103 Left = 103
Height = 21 Height = 23
Top = 311 Top = 315
Width = 171 Width = 171
BorderSpacing.Top = 3 BorderSpacing.Top = 3
TabOrder = 4 TabOrder = 3
Text = 'HelpKeyWordEdit' Text = 'HelpKeyWordEdit'
end end
object ButtonsPanel: TPanel
Left = 509
Height = 177
Top = 70
Width = 285
ClientHeight = 177
ClientWidth = 285
TabOrder = 5
object ButtonsStringGrid: TStringGrid
Left = 1
Height = 138
Top = 1
Width = 283
Align = alTop
ColCount = 2
FixedCols = 0
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll]
RowCount = 4
TabOrder = 0
OnPickListSelect = UpdateQuestioDlgResultExecute
OnSelectEditor = ButtonsStringGridSelectEditor
ColWidths = (
171
104
)
Cells = (
8
0
0
'BUTTONS (array of const)'
0
1
'Yes'
0
2
'No'
0
3
'Cancel'
1
0
'Modal Result'
1
1
'mrYes'
1
2
'mrNo'
1
3
'mrCancel'
)
end
object Panel2: TPanel
Left = 1
Height = 37
Top = 139
Width = 283
Align = alClient
BevelInner = bvLowered
BevelOuter = bvSpace
ClientHeight = 37
ClientWidth = 283
TabOrder = 1
object BitBtn1: TBitBtn
Left = 2
Height = 33
Top = 2
Width = 128
Action = AddConst
Align = alLeft
NumGlyphs = 0
TabOrder = 0
end
object BitBtn2: TBitBtn
Left = 153
Height = 33
Top = 2
Width = 128
Action = DelConst
Align = alRight
NumGlyphs = 0
TabOrder = 1
end
end
end
object XSpinEdit: TSpinEdit object XSpinEdit: TSpinEdit
AnchorSideLeft.Control = XLabel AnchorSideLeft.Control = XLabel
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = PositionBevel AnchorSideTop.Control = PositionBevel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 17 Left = 18
Height = 27 Height = 23
Top = 252 Top = 258
Width = 66 Width = 66
BorderSpacing.Left = 4 BorderSpacing.Left = 4
BorderSpacing.Top = 6 BorderSpacing.Top = 6
BorderSpacing.Bottom = 6 BorderSpacing.Bottom = 6
TabOrder = 6 TabOrder = 4
end end
object YSpinEdit: TSpinEdit object YSpinEdit: TSpinEdit
AnchorSideLeft.Control = YLabel AnchorSideLeft.Control = YLabel
AnchorSideLeft.Side = asrBottom AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = XSpinEdit AnchorSideTop.Control = XSpinEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 102 Left = 104
Height = 27 Height = 23
Top = 252 Top = 258
Width = 66 Width = 66
BorderSpacing.Left = 4 BorderSpacing.Left = 4
TabOrder = 7 TabOrder = 5
end end
object HelpFileNameEdit: TFileNameEdit object HelpFileNameEdit: TFileNameEdit
AnchorSideTop.Control = HelpFileNameLabel AnchorSideTop.Control = HelpFileNameLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 8 Left = 8
Height = 21 Height = 23
Top = 361 Top = 363
Width = 244 Width = 244
DialogOptions = [] DialogOptions = []
FilterIndex = 0 FilterIndex = 0
@ -371,242 +249,219 @@ object FormMessagesComposer: TFormMessagesComposer
NumGlyphs = 1 NumGlyphs = 1
BorderSpacing.Top = 3 BorderSpacing.Top = 3
MaxLength = 0 MaxLength = 0
TabOrder = 8 TabOrder = 6
end end
object PromptEdit: TEdit object PromptEdit: TEdit
AnchorSideTop.Control = PromptLabel AnchorSideTop.Control = PromptLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 16 Left = 16
Height = 21 Height = 23
Top = 442 Top = 444
Width = 164 Width = 164
BorderSpacing.Top = 3 BorderSpacing.Top = 3
TabOrder = 9 TabOrder = 7
Text = 'PromptEdit' Text = 'PromptEdit'
end end
object MaskInputCheckBox: TCheckBox object MaskInputCheckBox: TCheckBox
AnchorSideTop.Control = PromptEdit AnchorSideTop.Control = PromptEdit
AnchorSideTop.Side = asrCenter AnchorSideTop.Side = asrCenter
Left = 191 Left = 191
Height = 17 Height = 19
Top = 444 Top = 446
Width = 68 Width = 76
Caption = 'MaskInput' Caption = 'MaskInput'
TabOrder = 10 TabOrder = 8
end end
object ValueEdit: TEdit object ValueEdit: TEdit
AnchorSideTop.Control = ValueLabel AnchorSideTop.Control = ValueLabel
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 16 Left = 16
Height = 21 Height = 23
Top = 495 Top = 497
Width = 112 Width = 112
BorderSpacing.Top = 3 BorderSpacing.Top = 3
TabOrder = 11 TabOrder = 9
Text = 'ValueEdit' Text = 'ValueEdit'
end end
object DefaultEdit: TEdit object DefaultEdit: TEdit
AnchorSideTop.Control = DefaultValue AnchorSideTop.Control = DefaultValue
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 138 Left = 138
Height = 21 Height = 23
Top = 495 Top = 497
Width = 136 Width = 136
BorderSpacing.Top = 3 BorderSpacing.Top = 3
TabOrder = 12 TabOrder = 10
Text = 'DefaultEdit' Text = 'DefaultEdit'
end end
object TestButton: TButton
Left = 307
Height = 37
Top = 501
Width = 256
Action = Test
BorderSpacing.InnerBorder = 4
TabOrder = 13
end
object OkButton: TBitBtn
Left = 605
Height = 37
Top = 501
Width = 100
AutoSize = True
Caption = '&OK'
Constraints.MinHeight = 37
Constraints.MinWidth = 100
Default = True
Kind = bkOK
ModalResult = 1
NumGlyphs = 0
TabOrder = 14
end
object CancelButton: TBitBtn
AnchorSideLeft.Control = OkButton
AnchorSideLeft.Side = asrBottom
Left = 709
Height = 37
Top = 501
Width = 100
BorderSpacing.Left = 4
Cancel = True
Caption = 'Cancel'
Constraints.MinHeight = 37
Constraints.MinWidth = 100
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
TabOrder = 15
end
object SourceWrapperGroupBox: TGroupBox object SourceWrapperGroupBox: TGroupBox
Left = 307 Left = 285
Height = 221 Height = 256
Top = 264 Top = 264
Width = 509 Width = 285
Caption = 'SourceWrapperGroupBox' Caption = 'SourceWrapperGroupBox'
ClientHeight = 203 ClientHeight = 238
ClientWidth = 505 ClientWidth = 281
TabOrder = 16 TabOrder = 12
object Label1: TLabel
Left = 7
Height = 14
Top = 6
Width = 55
Caption = '"if" RESULT'
ParentColor = False
end
object StringResultLabel: TLabel
AnchorSideTop.Side = asrBottom
Left = 9
Height = 14
Top = 145
Width = 69
BorderSpacing.Top = 8
Caption = 'String RESULT'
ParentColor = False
end
object IfThenRadioButton: TRadioButton object IfThenRadioButton: TRadioButton
Left = 7 Left = 9
Height = 17 Height = 19
Top = 72 Top = 8
Width = 70 Width = 69
Caption = 'if...then...' Caption = 'if...then...'
Checked = True Checked = True
OnClick = SetIfOrCaseExecute OnClick = SetIfOrCaseExecute
State = cbChecked
TabOrder = 0 TabOrder = 0
TabStop = True
end end
object IfThenElseRadioButton: TRadioButton object IfThenElseRadioButton: TRadioButton
AnchorSideTop.Control = IfThenRadioButton AnchorSideTop.Control = IfThenRadioButton
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 7 Left = 7
Height = 17 Height = 19
Top = 91 Top = 29
Width = 104 Width = 101
BorderSpacing.Top = 2 BorderSpacing.Top = 2
Caption = 'if...then...else ...' Caption = 'if...then...else ...'
OnClick = SetIfOrCaseExecute OnClick = SetIfOrCaseExecute
TabOrder = 1 TabOrder = 1
TabStop = False
end end
object CaseOfEndRadioButton: TRadioButton object CaseOfEndRadioButton: TRadioButton
Left = 199 AnchorSideLeft.Control = IfThenRadioButton
Height = 17 AnchorSideLeft.Side = asrBottom
Top = 143 AnchorSideTop.Control = IfThenRadioButton
Width = 108 Left = 128
Height = 19
Top = 10
Width = 107
BorderSpacing.Left = 50
BorderSpacing.Top = 2
Caption = 'case ... of ... end;' Caption = 'case ... of ... end;'
OnClick = SetIfOrCaseExecute OnClick = SetIfOrCaseExecute
TabOrder = 2 TabOrder = 2
TabStop = False
end end
object CaseOfEndElseRadioButton: TRadioButton object CaseOfEndElseRadioButton: TRadioButton
AnchorSideLeft.Control = CaseOfEndRadioButton
AnchorSideTop.Control = CaseOfEndRadioButton AnchorSideTop.Control = CaseOfEndRadioButton
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 199 Left = 128
Height = 17 Height = 19
Top = 162 Top = 31
Width = 120 Width = 116
BorderSpacing.Top = 2 BorderSpacing.Top = 2
Caption = 'case ... of ... else ...' Caption = 'case ... of ... else ...'
OnClick = SetIfOrCaseExecute OnClick = SetIfOrCaseExecute
TabOrder = 3 TabOrder = 3
TabStop = False
end end
object BeginEndCheckBox: TCheckBox object BeginEndCheckBox: TCheckBox
Left = 385 Left = 9
Height = 17 Height = 19
Top = 152 Top = 56
Width = 80 Width = 85
Caption = 'begin ... end' Caption = 'begin ... end'
TabOrder = 4 TabOrder = 4
end end
object IfResultComboBox: TComboBox object SourceNotebook: TNotebook
AnchorSideTop.Control = Label1 Left = 0
AnchorSideTop.Side = asrBottom Height = 152
Left = 7 Top = 86
Height = 21 Width = 281
Top = 23 PageIndex = 0
Width = 175 Align = alBottom
BorderSpacing.Top = 3
ItemHeight = 13
ItemIndex = 0
Items.Strings = (
'mbOK'
'mbCancel'
)
Style = csDropDownList
TabOrder = 5 TabOrder = 5
Text = 'mbOK' TabStop = True
end object PageIf: TPage
object CaseResultCheckGroup: TCheckGroup object Label1: TLabel
AnchorSideLeft.Control = IfResultComboBox Left = 7
AnchorSideLeft.Side = asrBottom Height = 16
Left = 192 Top = 6
Height = 118 Width = 61
Top = -1 Caption = '"if" RESULT'
Width = 299 ParentColor = False
AutoFill = True end
BorderSpacing.Left = 10 object IfResultComboBox: TComboBox
Caption = '"case" RESULT' AnchorSideTop.Control = Label1
ChildSizing.LeftRightSpacing = 6 AnchorSideTop.Side = asrBottom
ChildSizing.TopBottomSpacing = 6 Left = 7
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize Height = 23
ChildSizing.EnlargeVertical = crsHomogenousChildResize Top = 25
ChildSizing.ShrinkHorizontal = crsScaleChilds Width = 175
ChildSizing.ShrinkVertical = crsScaleChilds BorderSpacing.Top = 3
ChildSizing.Layout = cclLeftToRightThenTopToBottom ItemHeight = 15
ChildSizing.ControlsPerLine = 3 ItemIndex = 0
Columns = 3 Items.Strings = (
Items.Strings = ( 'mbOK'
'mbOK' 'mbCancel'
'mbCancel' )
) Style = csDropDownList
TabOrder = 6 TabOrder = 0
Data = { Text = 'mbOK'
020000000302 end
} end
end object PageCase: TPage
object StringResultEdit: TEdit object CaseResultCheckGroup: TCheckGroup
AnchorSideTop.Control = StringResultLabel Left = 10
AnchorSideTop.Side = asrBottom Height = 128
Left = 9 Top = 0
Height = 21 Width = 238
Top = 162 Align = alClient
Width = 173 AutoFill = True
BorderSpacing.Top = 3 BorderSpacing.Left = 10
TabOrder = 7 Caption = '"case" RESULT'
Text = 'StringResultEdit' ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 3
Columns = 3
Items.Strings = (
'mbOK'
'mbCancel'
)
TabOrder = 0
Data = {
020000000302
}
end
end
object PageString: TPage
object StringResultLabel: TLabel
AnchorSideTop.Side = asrBottom
Left = 9
Height = 16
Top = 10
Width = 75
BorderSpacing.Top = 8
Caption = 'String RESULT'
ParentColor = False
end
object StringResultEdit: TEdit
AnchorSideTop.Control = StringResultLabel
AnchorSideTop.Side = asrBottom
Left = 9
Height = 23
Top = 29
Width = 173
BorderSpacing.Top = 3
TabOrder = 0
Text = 'StringResultEdit'
end
end
end end
end end
object KindMessageComboBox: TComboBox object KindMessageComboBox: TComboBox
Left = 6 Left = 6
Height = 21 Height = 23
Top = 24 Top = 26
Width = 810 Width = 572
Align = alTop Align = alTop
BorderSpacing.Left = 6 BorderSpacing.Left = 6
BorderSpacing.Top = 4 BorderSpacing.Top = 4
BorderSpacing.Right = 6 BorderSpacing.Right = 6
ItemHeight = 13 ItemHeight = 15
ItemIndex = 0 ItemIndex = 0
Items.Strings = ( Items.Strings = (
'MessageDlg[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]' 'MessageDlg[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]'
@ -626,7 +481,7 @@ object FormMessagesComposer: TFormMessagesComposer
) )
OnChange = MessageSetupExecute OnChange = MessageSetupExecute
Style = csDropDownList Style = csDropDownList
TabOrder = 17 TabOrder = 14
Text = 'MessageDlg[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]' Text = 'MessageDlg[Msg, DlgType, Buttons(TMsgDlgButtons), HelpCtx]'
end end
object MsgMemo: TMemo object MsgMemo: TMemo
@ -634,7 +489,7 @@ object FormMessagesComposer: TFormMessagesComposer
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
Left = 6 Left = 6
Height = 94 Height = 94
Top = 137 Top = 143
Width = 268 Width = 268
BorderSpacing.Top = 3 BorderSpacing.Top = 3
Lines.Strings = ( Lines.Strings = (
@ -642,9 +497,208 @@ object FormMessagesComposer: TFormMessagesComposer
) )
OnEditingDone = GetParamsFmtExecute OnEditingDone = GetParamsFmtExecute
ScrollBars = ssAutoVertical ScrollBars = ssAutoVertical
TabOrder = 18 TabOrder = 11
WordWrap = False WordWrap = False
end end
object ButtonsNotebook: TNotebook
Left = 285
Height = 177
Top = 70
Width = 285
PageIndex = 0
TabOrder = 13
TabStop = True
object Page1: TPage
object ButtonsCheckGroup: TCheckGroup
Left = 0
Height = 177
Top = 0
Width = 285
Align = alClient
AutoFill = True
Caption = 'BUTTONS (TMsgDlgButtons)'
ChildSizing.LeftRightSpacing = 6
ChildSizing.TopBottomSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
ChildSizing.EnlargeVertical = crsHomogenousChildResize
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 2
Columns = 2
Items.Strings = (
'mbYes'
'mbNo'
'mbOK'
'mbCancel'
'mbAbort'
'mbRetry'
'mbIgnore'
'mbAll'
'mbNoToAll'
'mbYesToAll'
'mbHelp'
'mbClose'
)
OnItemClick = ButtonsCheckGroupItemClick
TabOrder = 0
Data = {
0C000000020203030202020202020202
}
end
end
object Page2: TPage
object ButtonsPanel: TPanel
Left = 0
Height = 177
Top = 0
Width = 285
Align = alClient
ClientHeight = 177
ClientWidth = 285
TabOrder = 0
object ButtonsStringGrid: TStringGrid
Left = 1
Height = 138
Top = 1
Width = 283
Align = alTop
ColCount = 2
FixedCols = 0
Options = [goFixedVertLine, goFixedHorzLine, goVertLine, goHorzLine, goRangeSelect, goEditing, goSmoothScroll]
RowCount = 4
TabOrder = 0
OnPickListSelect = UpdateQuestioDlgResultExecute
OnSelectEditor = ButtonsStringGridSelectEditor
ColWidths = (
171
104
)
Cells = (
8
0
0
'BUTTONS (array of const)'
0
1
'Yes'
0
2
'No'
0
3
'Cancel'
1
0
'Modal Result'
1
1
'mrYes'
1
2
'mrNo'
1
3
'mrCancel'
)
end
object Panel2: TPanel
Left = 1
Height = 37
Top = 139
Width = 283
Align = alClient
BevelInner = bvLowered
BevelOuter = bvSpace
ClientHeight = 37
ClientWidth = 283
TabOrder = 1
object BitBtn1: TBitBtn
Left = 2
Height = 33
Top = 2
Width = 128
Action = AddConst
Align = alLeft
NumGlyphs = 0
TabOrder = 0
end
object BitBtn2: TBitBtn
Left = 153
Height = 33
Top = 2
Width = 128
Action = DelConst
Align = alRight
NumGlyphs = 0
TabOrder = 1
end
end
end
end
end
object ButtonPanel: TPanel
Left = 0
Height = 49
Top = 542
Width = 584
Align = alBottom
AutoSize = True
BevelOuter = bvNone
ClientHeight = 49
ClientWidth = 584
TabOrder = 15
object TestButton: TButton
AnchorSideLeft.Control = ButtonPanel
AnchorSideTop.Control = ButtonPanel
Left = 6
Height = 37
Top = 6
Width = 256
Action = Test
BorderSpacing.Around = 6
BorderSpacing.InnerBorder = 4
TabOrder = 0
end
object OkButton: TBitBtn
AnchorSideRight.Control = CancelButton
Left = 372
Height = 37
Top = 6
Width = 100
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
Caption = '&OK'
Constraints.MinHeight = 37
Constraints.MinWidth = 100
Default = True
Kind = bkOK
ModalResult = 1
NumGlyphs = 0
TabOrder = 1
end
object CancelButton: TBitBtn
AnchorSideLeft.Control = OkButton
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = ButtonPanel
AnchorSideRight.Side = asrBottom
Left = 478
Height = 37
Top = 6
Width = 100
Anchors = [akTop, akRight]
BorderSpacing.Around = 6
Cancel = True
Caption = 'Cancel'
Constraints.MinHeight = 37
Constraints.MinWidth = 100
Kind = bkCancel
ModalResult = 2
NumGlyphs = 0
TabOrder = 2
end
end
object ActionList1: TActionList object ActionList1: TActionList
left = 456 left = 456
top = 368 top = 368

View File

@ -37,6 +37,14 @@ type
KindMessageComboBox: TComboBox; KindMessageComboBox: TComboBox;
KindMessageLabel: TLabel; KindMessageLabel: TLabel;
MsgMemo: TMemo; MsgMemo: TMemo;
ButtonsNotebook: TNotebook;
PageString: TPage;
ButtonPanel: TPanel;
SourceNotebook: TNotebook;
Page1: TPage;
Page2: TPage;
PageIf: TPage;
PageCase: TPage;
UpdateQuestioDlgResult: TAction; UpdateQuestioDlgResult: TAction;
SetIfOrCase: TAction; SetIfOrCase: TAction;
PositionBevel: TBevel; PositionBevel: TBevel;
@ -475,6 +483,10 @@ procedure TFormMessagesComposer.MessageSetupExecute(Sender: TObject);
var indx: integer; var indx: integer;
ListResult: TStringList; ListResult: TStringList;
begin begin
if KindMessageComboBox.ItemIndex in [0,1,2,3,4] then
ButtonsNotebook.PageIndex := 0 // ButtonsCheckGroup
else
ButtonsNotebook.PageIndex := 1; // ButtonsPanel
//Msg //Msg
case KindMessageComboBox.ItemIndex of case KindMessageComboBox.ItemIndex of
0,1,2,3,4,5,6,7,8,9: begin 0,1,2,3,4,5,6,7,8,9: begin
@ -508,15 +520,6 @@ begin
DlgTypeComboBox.Enabled := false; DlgTypeComboBox.Enabled := false;
end; end;
end; end;
//BUTTONS (TMsgDlgButtons)
case KindMessageComboBox.ItemIndex of
0,1,2,3,4: begin
ButtonsCheckGroup.Enabled := true;
end;
else begin
ButtonsCheckGroup.Enabled := false;
end;
end;
//HelpContext //HelpContext
case KindMessageComboBox.ItemIndex of case KindMessageComboBox.ItemIndex of
0,1,3,4,5: begin 0,1,3,4,5: begin
@ -565,17 +568,6 @@ begin
HelpFileNameEdit.Enabled := false; HelpFileNameEdit.Enabled := false;
end; end;
end; end;
//Params BUTTONS (array of const)
case KindMessageComboBox.ItemIndex of
5,6,8: begin
ButtonsPanel.Enabled := true;
ButtonsStringGrid.Color := clWindow;
end;
else begin
ButtonsPanel.Enabled := false;
ButtonsStringGrid.Color := clBtnFace;
end;
end;
//Params (array of const) //Params (array of const)
case KindMessageComboBox.ItemIndex of case KindMessageComboBox.ItemIndex of
8: begin 8: begin
@ -636,22 +628,28 @@ begin
//InputBox(); PasswordBox(); //InputBox(); PasswordBox();
case KindMessageComboBox.ItemIndex of case KindMessageComboBox.ItemIndex of
12,13: begin 12,13: begin
StringResultEdit.Enabled := true; SourceNotebook.PageIndex := 2;
StringResultEdit.Color := clWindow; //StringResultEdit.Enabled := true;
IfResultComboBox.Enabled := false; //StringResultEdit.Color := clWindow;
IfResultComboBox.Color := clBtnFace; //IfResultComboBox.Enabled := false;
CaseResultCheckGroup.Enabled := false; //IfResultComboBox.Color := clBtnFace;
CaseOfEndElseRadioButton.Enabled := false; //CaseResultCheckGroup.Enabled := false;
CaseOfEndRadioButton.Enabled := false; //CaseOfEndElseRadioButton.Enabled := false;
//CaseOfEndRadioButton.Enabled := false;
end;
else begin
if IfThenRadioButton.Checked or IfThenElseRadioButton.Checked then
SourceNotebook.PageIndex := 0
else
SourceNotebook.PageIndex := 1;
//StringResultEdit.Enabled := false;
//StringResultEdit.Color := clBtnFace;
//IfResultComboBox.Enabled := true;
//IfResultComboBox.Color := clWindow;
//CaseResultCheckGroup.Enabled := true;
//CaseOfEndElseRadioButton.Enabled := true;
//CaseOfEndRadioButton.Enabled := true;
end; end;
else
StringResultEdit.Enabled := false;
StringResultEdit.Color := clBtnFace;
IfResultComboBox.Enabled := true;
IfResultComboBox.Color := clWindow;
CaseResultCheckGroup.Enabled := true;
CaseOfEndElseRadioButton.Enabled := true;
CaseOfEndRadioButton.Enabled := true;
end; end;
//ShowMessage(); ShowMessageFmt(); ShowMessagePos(); //ShowMessage(); ShowMessageFmt(); ShowMessagePos();
@ -775,15 +773,10 @@ procedure TFormMessagesComposer.SetIfOrCaseExecute(Sender: TObject);
begin begin
if (KindMessageComboBox.ItemIndex = 12)or if (KindMessageComboBox.ItemIndex = 12)or
(KindMessageComboBox.ItemIndex = 13) then exit; (KindMessageComboBox.ItemIndex = 13) then exit;
if (Sender=IfThenRadioButton)or(Sender=IfThenElseRadioButton) then begin if IfThenRadioButton.Checked or IfThenElseRadioButton.Checked then
IfResultComboBox.Color := clWindow; SourceNotebook.PageIndex := 0
IfResultComboBox.Enabled := true; else
CaseResultCheckGroup.Enabled := false; SourceNotebook.PageIndex := 1;
end else begin
IfResultComboBox.Color := clBtnFace;
IfResultComboBox.Enabled := false;
CaseResultCheckGroup.Enabled := true;
end;
end; end;
procedure TFormMessagesComposer.TestExecute(Sender: TObject); procedure TFormMessagesComposer.TestExecute(Sender: TObject);