fix: missing control anchors on search/replace dialog

This commit is contained in:
Ansgar Becker
2025-12-18 10:38:50 +01:00
parent f72156d2ad
commit c07b15504b
2 changed files with 686 additions and 611 deletions

View File

@@ -3,94 +3,109 @@ object frmSearchReplace: TfrmSearchReplace
Height = 389
Top = 0
Width = 542
AutoSize = True
BorderIcons = []
Caption = 'Search and replace text'
ClientHeight = 389
ClientWidth = 542
Color = clBtnFace
Constraints.MinHeight = 150
Constraints.MinWidth = 250
Constraints.MinHeight = 350
Constraints.MinWidth = 500
DesignTimePPI = 120
Font.Color = clWindowText
Position = poOwnerFormCenter
OnClose = FormClose
OnCreate = FormCreate
OnShow = FormShow
Position = poOwnerFormCenter
object lblSearch: TLabel
AnchorSideTop.Control = comboSearchIn
AnchorSideTop.Side = asrBottom
Left = 10
AnchorSideLeft.Control = lblSearchIn
AnchorSideTop.Control = comboSearch
AnchorSideTop.Side = asrCenter
Left = 6
Height = 20
Top = 40
Top = 44
Width = 78
BorderSpacing.Around = 6
Caption = '&Text to find:'
FocusControl = comboSearch
end
object lblReplaceHint: TLabel
AnchorSideLeft.Control = comboReplace
AnchorSideTop.Control = comboReplace
AnchorSideTop.Side = asrBottom
Left = 112
Left = 109
Height = 20
Top = 108
Width = 324
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
Top = 102
Width = 354
Caption = 'Replacement can have \n for new lines and \t for tabs'
Enabled = False
end
object lblSearchIn: TLabel
AnchorSideTop.Control = Owner
Left = 10
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = comboSearchIn
AnchorSideTop.Side = asrCenter
Left = 6
Height = 20
Top = 6
Top = 10
Width = 63
BorderSpacing.Around = 6
BorderSpacing.Left = 6
Caption = 'Search in:'
end
object btnCancel: TButton
Left = 408
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 411
Height = 31
Top = 348
Top = 352
Width = 125
Anchors = [akRight, akBottom]
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Cancel = True
Caption = 'Cancel'
ModalResult = 2
TabOrder = 12
end
object btnReplaceAll: TButton
Left = 276
AnchorSideRight.Control = btnCancel
AnchorSideBottom.Control = btnCancel
AnchorSideBottom.Side = asrCenter
Left = 280
Height = 31
Top = 348
Top = 351
Width = 125
Anchors = [akRight, akBottom]
BorderSpacing.Right = 6
Caption = 'Replace &all'
ModalResult = 12
TabOrder = 11
OnClick = DoSearchReplace
end
object chkReplace: TCheckBox
AnchorSideTop.Control = comboSearch
AnchorSideTop.Side = asrBottom
Left = 10
AnchorSideLeft.Control = lblSearch
AnchorSideTop.Control = comboReplace
AnchorSideTop.Side = asrCenter
Left = 6
Height = 24
Top = 74
Top = 76
Width = 77
BorderSpacing.Around = 6
Caption = '&Replace:'
TabOrder = 3
OnClick = chkReplaceClick
end
object comboSearch: TComboBox
AnchorSideLeft.Control = comboSearchIn
AnchorSideTop.Control = comboSearchIn
AnchorSideTop.Side = asrBottom
Left = 112
AnchorSideRight.Control = btnSearchHints
Left = 109
Height = 28
Top = 40
Width = 381
Width = 390
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
ItemHeight = 20
TabOrder = 1
Text = 'comboSearch'
@@ -98,14 +113,17 @@ object frmSearchReplace: TfrmSearchReplace
OnExit = comboSearchReplaceExit
end
object comboReplace: TComboBox
AnchorSideLeft.Control = comboSearch
AnchorSideTop.Control = comboSearch
AnchorSideTop.Side = asrBottom
Left = 112
AnchorSideRight.Control = btnReplaceHints
Left = 109
Height = 28
Top = 74
Width = 381
Width = 390
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
Enabled = False
ItemHeight = 20
TabOrder = 4
@@ -114,40 +132,58 @@ object frmSearchReplace: TfrmSearchReplace
OnExit = comboSearchReplaceExit
end
object grpOptions: TGroupBox
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = lblReplaceHint
AnchorSideTop.Side = asrBottom
Left = 10
Height = 86
Top = 134
Width = 522
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 6
Height = 91
Top = 128
Width = 530
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
AutoSize = True
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
Caption = '&Options'
ClientHeight = 61
ClientWidth = 518
ClientHeight = 66
ClientWidth = 526
ParentBackground = False
TabOrder = 6
object chkCaseSensitive: TCheckBox
Left = 15
AnchorSideLeft.Control = grpOptions
AnchorSideTop.Control = grpOptions
Left = 6
Height = 24
Top = 0
Top = 6
Width = 112
BorderSpacing.Around = 6
Caption = 'Case sensitive'
TabOrder = 0
end
object chkWholeWords: TCheckBox
Left = 15
AnchorSideLeft.Control = grpOptions
AnchorSideTop.Control = chkCaseSensitive
AnchorSideTop.Side = asrBottom
Left = 6
Height = 24
Top = 29
Top = 36
Width = 108
BorderSpacing.Around = 6
Caption = 'Whole words'
TabOrder = 1
end
object chkRegularExpression: TCheckBox
Left = 230
AnchorSideLeft.Control = chkCaseSensitive
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpOptions
Left = 174
Height = 24
Top = 0
Top = 6
Width = 146
BorderSpacing.Left = 50
BorderSpacing.Around = 6
Caption = 'Regular expression'
ParentShowHint = False
ShowHint = True
@@ -155,23 +191,33 @@ object frmSearchReplace: TfrmSearchReplace
OnClick = ValidateControls
end
object chkPromptOnReplace: TCheckBox
Left = 230
AnchorSideLeft.Control = chkRegularExpression
AnchorSideLeft.Side = asrCenter
AnchorSideTop.Control = chkRegularExpression
AnchorSideTop.Side = asrBottom
Left = 175
Height = 24
Top = 29
Top = 36
Width = 144
BorderSpacing.Around = 6
Caption = 'Prompt on replace'
TabOrder = 3
end
end
object grpDirection: TRadioGroup
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = grpOptions
AnchorSideTop.Side = asrBottom
Left = 10
Height = 114
Top = 226
Width = 150
AnchorSideBottom.Control = btnOK
Left = 6
Height = 119
Top = 225
Width = 170
Anchors = [akTop, akLeft, akBottom]
AutoFill = True
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
Caption = '&Direction'
ChildSizing.LeftRightSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
@@ -180,8 +226,8 @@ object frmSearchReplace: TfrmSearchReplace
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 89
ClientWidth = 146
ClientHeight = 94
ClientWidth = 166
ItemIndex = 0
Items.Strings = (
'&Forward'
@@ -191,14 +237,20 @@ object frmSearchReplace: TfrmSearchReplace
TabOrder = 7
end
object grpOrigin: TRadioGroup
AnchorSideLeft.Control = grpDirection
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpOptions
AnchorSideTop.Side = asrBottom
Left = 168
Height = 114
Top = 226
Width = 150
AnchorSideBottom.Control = btnOK
Left = 182
Height = 119
Top = 225
Width = 170
Anchors = [akTop, akLeft, akBottom]
AutoFill = True
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Bottom = 6
Caption = 'Or&igin'
ChildSizing.LeftRightSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
@@ -207,8 +259,8 @@ object frmSearchReplace: TfrmSearchReplace
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 89
ClientWidth = 146
ClientHeight = 94
ClientWidth = 166
ItemIndex = 1
Items.Strings = (
'From cursor'
@@ -218,14 +270,23 @@ object frmSearchReplace: TfrmSearchReplace
TabOrder = 8
end
object grpScope: TRadioGroup
AnchorSideLeft.Control = grpOrigin
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = grpOptions
AnchorSideTop.Side = asrBottom
Left = 325
Height = 114
Top = 226
Width = 207
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = btnOK
Left = 358
Height = 119
Top = 225
Width = 178
Anchors = [akTop, akLeft, akRight, akBottom]
AutoFill = True
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Caption = '&Scope'
ChildSizing.LeftRightSpacing = 6
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
@@ -234,8 +295,8 @@ object frmSearchReplace: TfrmSearchReplace
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.Layout = cclLeftToRightThenTopToBottom
ChildSizing.ControlsPerLine = 1
ClientHeight = 89
ClientWidth = 203
ClientHeight = 94
ClientWidth = 174
ItemIndex = 0
Items.Strings = (
'Global'
@@ -245,11 +306,15 @@ object frmSearchReplace: TfrmSearchReplace
TabOrder = 9
end
object btnOK: TButton
Left = 143
AnchorSideRight.Control = btnReplaceAll
AnchorSideBottom.Control = btnReplaceAll
AnchorSideBottom.Side = asrCenter
Left = 149
Height = 31
Top = 348
Top = 350
Width = 125
Anchors = [akRight, akBottom]
BorderSpacing.Right = 6
Caption = 'OK'
Default = True
ModalResult = 1
@@ -257,39 +322,49 @@ object frmSearchReplace: TfrmSearchReplace
OnClick = DoSearchReplace
end
object comboSearchIn: TComboBox
AnchorSideLeft.Control = lblSearchIn
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Owner
Left = 112
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 109
Height = 28
Top = 6
Width = 420
Width = 427
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Around = 6
BorderSpacing.Left = 40
BorderSpacing.Top = 6
BorderSpacing.Right = 6
ItemHeight = 20
Style = csDropDownList
TabOrder = 0
end
object btnSearchHints: TButton
AnchorSideTop.Control = comboSearchIn
AnchorSideTop.Side = asrBottom
Left = 501
AnchorSideTop.Control = comboSearch
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 505
Height = 31
Top = 40
Top = 39
Width = 31
Anchors = [akTop, akRight]
BorderSpacing.Around = 6
BorderSpacing.Right = 6
Caption = '⏷'
TabOrder = 2
OnClick = btnWithDropDownClick
end
object btnReplaceHints: TButton
AnchorSideTop.Control = comboSearch
AnchorSideTop.Side = asrBottom
Left = 501
AnchorSideTop.Control = comboReplace
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Owner
AnchorSideRight.Side = asrBottom
Left = 505
Height = 31
Top = 74
Top = 73
Width = 31
Anchors = [akTop, akRight]
BorderSpacing.Around = 6
BorderSpacing.Right = 6
Caption = '⏷'
Enabled = False
TabOrder = 5

View File

File diff suppressed because it is too large Load Diff