fixed TReplaceDialog, localized TFindDialog and TReplaceDialog

git-svn-id: trunk@9480 -
This commit is contained in:
mattias 2006-06-22 20:16:57 +00:00
parent 01555cf0fa
commit 2757f800c3
10 changed files with 226 additions and 176 deletions

View File

@ -533,6 +533,7 @@ initialization
InterfaceBase.InputDialogFunction:=@ShowInputDialog;
InterfaceBase.PromptDialogFunction:=@ShowPromptDialog;
{$I forms/finddlgunit.lrs}
{$I forms/replacedlgunit.lrs}
finalization
InterfaceBase.InputDialogFunction:=nil;

View File

@ -5,7 +5,7 @@ object FindDialogForm: TFindDialogForm
ClientHeight = 103
ClientWidth = 444
OnCreate = FormCreate
PixelsPerInch = 96
PixelsPerInch = 112
Position = poDesktopCenter
HorzScrollBar.Page = 443
VertScrollBar.Page = 102
@ -13,15 +13,15 @@ object FindDialogForm: TFindDialogForm
Height = 103
Top = 434
Width = 444
object Label1: TLabel
object FindLabel: TLabel
Caption = 'Text to find'
Color = clNone
FocusControl = EditFind
ParentColor = False
Left = 6
Height = 14
Height = 13
Top = 19
Width = 57
Width = 62
end
object EditFind: TEdit
Anchors = [akTop, akLeft, akRight]
@ -33,9 +33,9 @@ object FindDialogForm: TFindDialogForm
Top = 10
Width = 269
end
object btnFind: TButton
object FindButton: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
Caption = 'Find more'
ModalResult = 1
TabOrder = 1
@ -44,9 +44,9 @@ object FindDialogForm: TFindDialogForm
Top = 8
Width = 91
end
object Button2: TButton
object CancelButton: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
Caption = 'Cancel'
ModalResult = 2
TabOrder = 2
@ -55,23 +55,23 @@ object FindDialogForm: TFindDialogForm
Top = 40
Width = 91
end
object CheckBox1: TCheckBox
object WholeWordsOnlyCheckBox: TCheckBox
Caption = 'Whole words only'
TabOrder = 3
Left = 6
Height = 13
Height = 20
Top = 51
Width = 104
Width = 127
end
object CheckBox2: TCheckBox
object CaseSensitiveCheckBox: TCheckBox
Caption = 'Case sensitive'
TabOrder = 4
Left = 6
Height = 13
Height = 20
Top = 78
Width = 88
Width = 109
end
object RadioGroup1: TRadioGroup
object DirectionRadioGroup: TRadioGroup
AutoFill = True
Caption = 'Direction'
ChildSizing.LeftRightSpacing = 6
@ -93,9 +93,9 @@ object FindDialogForm: TFindDialogForm
Top = 46
Width = 197
end
object btnHelp: TButton
object HelpButton: TButton
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
Caption = 'Help'
TabOrder = 6
Left = 349

View File

@ -1,31 +1,35 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TFindDialogForm','FORMDATA',[
'TPF0'#15'TFindDialogForm'#14'FindDialogForm'#13'ActiveControl'#7#8'EditFind'
+#11'BorderIcons'#11#12'biSystemMenu'#6'biHelp'#0#7'Caption'#6#4'Find'#12'Cli'
+'entHeight'#2'g'#11'ClientWidth'#3#188#1#8'OnCreate'#7#10'FormCreate'#13'Pix'
+'elsPerInch'#2'`'#8'Position'#7#15'poDesktopCenter'#18'HorzScrollBar.Page'#3
+'elsPerInch'#2'p'#8'Position'#7#15'poDesktopCenter'#18'HorzScrollBar.Page'#3
+#187#1#18'VertScrollBar.Page'#2'f'#4'Left'#3#195#1#6'Height'#2'g'#3'Top'#3
+#178#1#5'Width'#3#188#1#0#6'TLabel'#6'Label1'#7'Caption'#6#12'Text to find'#5
+'Color'#7#6'clNone'#12'FocusControl'#7#8'EditFind'#11'ParentColor'#8#4'Left'
+#2#6#6'Height'#2#14#3'Top'#2#19#5'Width'#2'9'#0#0#5'TEdit'#8'EditFind'#7'Anc'
+'hors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'OnChange'#7#14'EditFindChange'#8
+'TabOrder'#2#0#4'Text'#6#8'EditFind'#4'Left'#2'H'#6'Height'#2#23#3'Top'#2#10
+#5'Width'#3#13#1#0#0#7'TButton'#7'btnFind'#7'Anchors'#11#5'akTop'#7'akRight'
+#0#7'Caption'#6#9'Find more'#11'ModalResult'#2#1#8'TabOrder'#2#1#4'Left'#3']'
+#1#6'Height'#2#25#3'Top'#2#8#5'Width'#2'['#0#0#7'TButton'#7'Button2'#7'Ancho'
+'rs'#11#5'akTop'#7'akRight'#0#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'T'
+'abOrder'#2#2#4'Left'#3']'#1#6'Height'#2#25#3'Top'#2'('#5'Width'#2'['#0#0#9
+'TCheckBox'#9'CheckBox1'#7'Caption'#6#16'Whole words only'#8'TabOrder'#2#3#4
+'Left'#2#6#6'Height'#2#13#3'Top'#2'3'#5'Width'#2'h'#0#0#9'TCheckBox'#9'Check'
+'Box2'#7'Caption'#6#14'Case sensitive'#8'TabOrder'#2#4#4'Left'#2#6#6'Height'
+#2#13#3'Top'#2'N'#5'Width'#2'X'#0#0#11'TRadioGroup'#11'RadioGroup1'#8'AutoFi'
+'ll'#9#7'Caption'#6#9'Direction'#28'ChildSizing.LeftRightSpacing'#2#6#28'Chi'
+'ldSizing.TopBottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHo'
+'mogenousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChil'
+'dResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizi'
+'ng.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeft'
+'ToRightThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#2#7'Columns'#2#2
+#13'Items.Strings'#1#6#7'Forward'#6#8'Backward'#0#8'TabOrder'#2#5#4'Left'#3
+#144#0#6'Height'#2'-'#3'Top'#2'.'#5'Width'#3#197#0#0#0#7'TButton'#7'btnHelp'
+#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#4'Help'#8'TabOrder'#2#6
+#4'Left'#3']'#1#6'Height'#2#25#3'Top'#2'H'#5'Width'#2'['#0#0#0
+#178#1#5'Width'#3#188#1#0#6'TLabel'#9'FindLabel'#7'Caption'#6#12'Text to fin'
+'d'#5'Color'#7#6'clNone'#12'FocusControl'#7#8'EditFind'#11'ParentColor'#8#4
+'Left'#2#6#6'Height'#2#13#3'Top'#2#19#5'Width'#2'>'#0#0#5'TEdit'#8'EditFind'
+#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'OnChange'#7#14'EditFindChan'
+'ge'#8'TabOrder'#2#0#4'Text'#6#8'EditFind'#4'Left'#2'H'#6'Height'#2#23#3'Top'
+#2#10#5'Width'#3#13#1#0#0#7'TButton'#10'FindButton'#7'Anchors'#11#5'akTop'#7
+'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#9'Find more'#11'M'
+'odalResult'#2#1#8'TabOrder'#2#1#4'Left'#3']'#1#6'Height'#2#25#3'Top'#2#8#5
+'Width'#2'['#0#0#7'TButton'#12'CancelButton'#7'Anchors'#11#5'akTop'#7'akRigh'
+'t'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#6'Cancel'#11'ModalResul'
+'t'#2#2#8'TabOrder'#2#2#4'Left'#3']'#1#6'Height'#2#25#3'Top'#2'('#5'Width'#2
+'['#0#0#9'TCheckBox'#22'WholeWordsOnlyCheckBox'#7'Caption'#6#16'Whole words '
+'only'#8'TabOrder'#2#3#4'Left'#2#6#6'Height'#2#20#3'Top'#2'3'#5'Width'#2''#0
+#0#9'TCheckBox'#21'CaseSensitiveCheckBox'#7'Caption'#6#14'Case sensitive'#8
+'TabOrder'#2#4#4'Left'#2#6#6'Height'#2#20#3'Top'#2'N'#5'Width'#2'm'#0#0#11'T'
+'RadioGroup'#19'DirectionRadioGroup'#8'AutoFill'#9#7'Caption'#6#9'Direction'
+#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29
+'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizin'
+'g.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHori'
+'zontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleCh'
+'ilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSi'
+'zing.ControlsPerLine'#2#2#7'Columns'#2#2#13'Items.Strings'#1#6#7'Forward'#6
+#8'Backward'#0#8'TabOrder'#2#5#4'Left'#3#144#0#6'Height'#2'-'#3'Top'#2'.'#5
+'Width'#3#197#0#0#0#7'TButton'#10'HelpButton'#7'Anchors'#11#7'akRight'#8'akB'
+'ottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#4'Help'#8'TabOrder'
+#2#6#4'Left'#3']'#1#6'Height'#2#25#3'Top'#2'H'#5'Width'#2'['#0#0#0
]);

View File

@ -21,9 +21,9 @@
Abstract:
Only the .lrs file is used by the LCL (dialogs.pp).
This unit is itself is not compiled into the LCL.
This form is used to design the .lfm and lrs file.
This form is used to design the .lfm and .lrs file.
The code is copied to lcl/include/finddialog.inc.
The code is copied to ../lcl/include/finddialog.inc.
}
unit FindDlgUnit;
@ -40,14 +40,14 @@ type
{ TFindDialogForm }
TFindDialogForm = class(TForm)
btnFind: TButton;
Button2: TButton;
btnHelp: TButton;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
FindButton: TButton;
CancelButton: TButton;
HelpButton: TButton;
WholeWordsOnlyCheckBox: TCheckBox;
CaseSensitiveCheckBox: TCheckBox;
EditFind: TEdit;
Label1: TLabel;
RadioGroup1: TRadioGroup;
FindLabel: TLabel;
DirectionRadioGroup: TRadioGroup;
procedure EditFindChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
@ -60,7 +60,7 @@ implementation
procedure TFindDialogForm.EditFindChange(Sender: TObject);
begin
btnFind.Enabled:=EditFind.Text<>'';
FindButton.Enabled:=EditFind.Text<>'';
end;
procedure TFindDialogForm.FormCreate(Sender: TObject);

View File

@ -4,32 +4,32 @@ object ReplaceDialogForm: TReplaceDialogForm
Caption = 'Replace text'
ClientHeight = 162
ClientWidth = 432
PixelsPerInch = 96
PixelsPerInch = 112
HorzScrollBar.Page = 431
VertScrollBar.Page = 161
Left = 460
Height = 162
Top = 471
Width = 432
object Label1: TLabel
object TextLabel: TLabel
Caption = 'Text to find'
Color = clNone
FocusControl = EditFind
ParentColor = False
Left = 4
Height = 14
Height = 13
Top = 19
Width = 57
Width = 62
end
object Label2: TLabel
object ReplaceLabel: TLabel
Caption = 'Replace with'
Color = clNone
FocusControl = EditReplace
ParentColor = False
Left = 4
Height = 14
Height = 13
Top = 48
Width = 62
Width = 73
end
object EditFind: TEdit
Anchors = [akTop, akLeft, akRight]
@ -49,25 +49,25 @@ object ReplaceDialogForm: TReplaceDialogForm
Top = 42
Width = 257
end
object CheckBox1: TCheckBox
object WholeWordsOnlyCheckBox: TCheckBox
Caption = 'Whole words only'
TabOrder = 2
Left = 4
Height = 13
Height = 20
Top = 80
Width = 104
Width = 127
end
object CheckBox2: TCheckBox
object CaseSensitiveCheckBox: TCheckBox
Caption = 'Case sensitive'
TabOrder = 3
Left = 4
Height = 13
Height = 20
Top = 104
Width = 88
Width = 109
end
object Button1: TButton
object FindMoreButton: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
Caption = 'Find more'
ModalResult = 1
OnClick = btnReplaceAllClick
@ -78,9 +78,9 @@ object ReplaceDialogForm: TReplaceDialogForm
Width = 91
Tag = 1
end
object btnReplace: TButton
object ReplaceButton: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
Caption = 'Replace'
ModalResult = 1
OnClick = btnReplaceAllClick
@ -91,9 +91,9 @@ object ReplaceDialogForm: TReplaceDialogForm
Width = 91
Tag = 2
end
object btnReplaceAll: TButton
object ReplaceAllButton: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
Caption = 'Replace all'
ModalResult = 1
OnClick = btnReplaceAllClick
@ -104,9 +104,9 @@ object ReplaceDialogForm: TReplaceDialogForm
Width = 91
Tag = 3
end
object Button4: TButton
object CancelButton: TButton
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
Caption = 'Cancel'
ModalResult = 2
TabOrder = 7
@ -115,9 +115,9 @@ object ReplaceDialogForm: TReplaceDialogForm
Top = 96
Width = 91
end
object btnHelp: TButton
object HelpButton: TButton
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
Caption = 'Help'
TabOrder = 8
Left = 337
@ -125,7 +125,7 @@ object ReplaceDialogForm: TReplaceDialogForm
Top = 129
Width = 91
end
object RadioGroup1: TRadioGroup
object DirectionRadioGroup: TRadioGroup
AutoFill = True
Caption = 'Direction'
ChildSizing.LeftRightSpacing = 6

View File

@ -1,42 +1,47 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TReplaceDialogForm','FORMDATA',[
'TPF0'#18'TReplaceDialogForm'#17'ReplaceDialogForm'#13'ActiveControl'#7#8'Edi'
+'tFind'#11'BorderIcons'#11#12'biSystemMenu'#6'biHelp'#0#7'Caption'#6#12'Repl'
+'ace text'#12'ClientHeight'#3#162#0#11'ClientWidth'#3#176#1#13'PixelsPerInch'
+#2'`'#18'HorzScrollBar.Page'#3#175#1#18'VertScrollBar.Page'#3#161#0#4'Left'#3
+#204#1#6'Height'#3#162#0#3'Top'#3#215#1#5'Width'#3#176#1#0#6'TLabel'#6'Label'
+'1'#7'Caption'#6#12'Text to find'#5'Color'#7#6'clNone'#12'FocusControl'#7#8
+'EditFind'#11'ParentColor'#8#4'Left'#2#4#6'Height'#2#14#3'Top'#2#19#5'Width'
+#2'9'#0#0#6'TLabel'#6'Label2'#7'Caption'#6#12'Replace with'#5'Color'#7#6'clN'
+'one'#12'FocusControl'#7#11'EditReplace'#11'ParentColor'#8#4'Left'#2#4#6'Hei'
+'ght'#2#14#3'Top'#2'0'#5'Width'#2'>'#0#0#5'TEdit'#8'EditFind'#7'Anchors'#11#5
+'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#0#4'Text'#6#8'EditFind'#4'Left'
+#2'H'#6'Height'#2#23#3'Top'#2#10#5'Width'#3#1#1#0#0#5'TEdit'#11'EditReplace'
+#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#1#4'Text'#6#11
+'EditReplace'#4'Left'#2'H'#6'Height'#2#23#3'Top'#2'*'#5'Width'#3#1#1#0#0#9'T'
+'CheckBox'#9'CheckBox1'#7'Caption'#6#16'Whole words only'#8'TabOrder'#2#2#4
+'Left'#2#4#6'Height'#2#13#3'Top'#2'P'#5'Width'#2'h'#0#0#9'TCheckBox'#9'Check'
+'Box2'#7'Caption'#6#14'Case sensitive'#8'TabOrder'#2#3#4'Left'#2#4#6'Height'
+#2#13#3'Top'#2'h'#5'Width'#2'X'#0#0#7'TButton'#7'Button1'#7'Anchors'#11#5'ak'
+'Top'#7'akRight'#0#7'Caption'#6#9'Find more'#11'ModalResult'#2#1#7'OnClick'#7
+#18'btnReplaceAllClick'#8'TabOrder'#2#4#4'Left'#3'Q'#1#6'Height'#2#25#3'Top'
+#2#11#5'Width'#2'['#3'Tag'#2#1#0#0#7'TButton'#10'btnReplace'#7'Anchors'#11#5
+'akTop'#7'akRight'#0#7'Caption'#6#7'Replace'#11'ModalResult'#2#1#7'OnClick'#7
+#18'btnReplaceAllClick'#8'TabOrder'#2#5#4'Left'#3'Q'#1#6'Height'#2#25#3'Top'
+#2'('#5'Width'#2'['#3'Tag'#2#2#0#0#7'TButton'#13'btnReplaceAll'#7'Anchors'#11
+#5'akTop'#7'akRight'#0#7'Caption'#6#11'Replace all'#11'ModalResult'#2#1#7'On'
+'Click'#7#18'btnReplaceAllClick'#8'TabOrder'#2#6#4'Left'#3'Q'#1#6'Height'#2
+#25#3'Top'#2'D'#5'Width'#2'['#3'Tag'#2#3#0#0#7'TButton'#7'Button4'#7'Anchors'
+#11#5'akTop'#7'akRight'#0#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOr'
+'der'#2#7#4'Left'#3'Q'#1#6'Height'#2#25#3'Top'#2'`'#5'Width'#2'['#0#0#7'TBut'
+'ton'#7'btnHelp'#7'Anchors'#11#7'akRight'#8'akBottom'#0#7'Caption'#6#4'Help'
+#8'TabOrder'#2#8#4'Left'#3'Q'#1#6'Height'#2#25#3'Top'#3#129#0#5'Width'#2'['#0
+#0#11'TRadioGroup'#11'RadioGroup1'#8'AutoFill'#9#7'Caption'#6#9'Direction'#28
+'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'C'
+'hildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing'
+'.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHoriz'
+'ontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChi'
+'lds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSiz'
+'ing.ControlsPerLine'#2#2#7'Columns'#2#2#13'Items.Strings'#1#6#7'Forward'#6#8
+'Backward'#0#8'TabOrder'#2#9#4'Left'#3#128#0#6'Height'#2'-'#3'Top'#2'P'#5'Wi'
+'dth'#3#184#0#0#0#0
+#2'p'#18'HorzScrollBar.Page'#3#175#1#18'VertScrollBar.Page'#3#161#0#4'Left'#3
+#204#1#6'Height'#3#162#0#3'Top'#3#215#1#5'Width'#3#176#1#0#6'TLabel'#9'TextL'
+'abel'#7'Caption'#6#12'Text to find'#5'Color'#7#6'clNone'#12'FocusControl'#7
+#8'EditFind'#11'ParentColor'#8#4'Left'#2#4#6'Height'#2#13#3'Top'#2#19#5'Widt'
+'h'#2'>'#0#0#6'TLabel'#12'ReplaceLabel'#7'Caption'#6#12'Replace with'#5'Colo'
+'r'#7#6'clNone'#12'FocusControl'#7#11'EditReplace'#11'ParentColor'#8#4'Left'
+#2#4#6'Height'#2#13#3'Top'#2'0'#5'Width'#2'I'#0#0#5'TEdit'#8'EditFind'#7'Anc'
+'hors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#0#4'Text'#6#8'EditFi'
+'nd'#4'Left'#2'H'#6'Height'#2#23#3'Top'#2#10#5'Width'#3#1#1#0#0#5'TEdit'#11
+'EditReplace'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#1#4
+'Text'#6#11'EditReplace'#4'Left'#2'H'#6'Height'#2#23#3'Top'#2'*'#5'Width'#3#1
+#1#0#0#9'TCheckBox'#22'WholeWordsOnlyCheckBox'#7'Caption'#6#16'Whole words o'
+'nly'#8'TabOrder'#2#2#4'Left'#2#4#6'Height'#2#20#3'Top'#2'P'#5'Width'#2''#0
+#0#9'TCheckBox'#21'CaseSensitiveCheckBox'#7'Caption'#6#14'Case sensitive'#8
+'TabOrder'#2#3#4'Left'#2#4#6'Height'#2#20#3'Top'#2'h'#5'Width'#2'm'#0#0#7'TB'
+'utton'#14'FindMoreButton'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpac'
+'ing.InnerBorder'#2#4#7'Caption'#6#9'Find more'#11'ModalResult'#2#1#7'OnClic'
+'k'#7#18'btnReplaceAllClick'#8'TabOrder'#2#4#4'Left'#3'Q'#1#6'Height'#2#25#3
+'Top'#2#11#5'Width'#2'['#3'Tag'#2#1#0#0#7'TButton'#13'ReplaceButton'#7'Ancho'
+'rs'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6
+#7'Replace'#11'ModalResult'#2#1#7'OnClick'#7#18'btnReplaceAllClick'#8'TabOrd'
+'er'#2#5#4'Left'#3'Q'#1#6'Height'#2#25#3'Top'#2'('#5'Width'#2'['#3'Tag'#2#2#0
+#0#7'TButton'#16'ReplaceAllButton'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'Bo'
+'rderSpacing.InnerBorder'#2#4#7'Caption'#6#11'Replace all'#11'ModalResult'#2
+#1#7'OnClick'#7#18'btnReplaceAllClick'#8'TabOrder'#2#6#4'Left'#3'Q'#1#6'Heig'
+'ht'#2#25#3'Top'#2'D'#5'Width'#2'['#3'Tag'#2#3#0#0#7'TButton'#12'CancelButto'
+'n'#7'Anchors'#11#5'akTop'#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#7
+'Caption'#6#6'Cancel'#11'ModalResult'#2#2#8'TabOrder'#2#7#4'Left'#3'Q'#1#6'H'
+'eight'#2#25#3'Top'#2'`'#5'Width'#2'['#0#0#7'TButton'#10'HelpButton'#7'Ancho'
+'rs'#11#7'akRight'#8'akBottom'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'
+#6#4'Help'#8'TabOrder'#2#8#4'Left'#3'Q'#1#6'Height'#2#25#3'Top'#3#129#0#5'Wi'
+'dth'#2'['#0#0#11'TRadioGroup'#19'DirectionRadioGroup'#8'AutoFill'#9#7'Capti'
+'on'#6#9'Direction'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopB'
+'ottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChild'
+'Resize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'C'
+'hildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVert'
+'ical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTo'
+'pToBottom'#27'ChildSizing.ControlsPerLine'#2#2#7'Columns'#2#2#13'Items.Stri'
+'ngs'#1#6#7'Forward'#6#8'Backward'#0#8'TabOrder'#2#9#4'Left'#3#128#0#6'Heigh'
+'t'#2'-'#3'Top'#2'P'#5'Width'#3#184#0#0#0#0
]);

View File

@ -23,7 +23,7 @@
This unit is itself is not compiled into the LCL.
This form is used to design the .lfm and lrs file.
The code is copied to lcl/include/replacedialog.inc.
The code is copied to ../lcl/include/replacedialog.inc.
}
unit ReplaceDlgUnit;
@ -33,7 +33,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
Buttons, finddlgunit, ExtCtrls;
Buttons, FindDlgUnit, ExtCtrls;
type
@ -42,18 +42,18 @@ type
{ TReplaceDialogForm }
TReplaceDialogForm = class(TForm)
Button1: TButton;
btnReplace: TButton;
btnReplaceAll: TButton;
Button4: TButton;
btnHelp: TButton;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
FindMoreButton: TButton;
ReplaceButton: TButton;
ReplaceAllButton: TButton;
CancelButton: TButton;
HelpButton: TButton;
WholeWordsOnlyCheckBox: TCheckBox;
CaseSensitiveCheckBox: TCheckBox;
EditFind: TEdit;
EditReplace: TEdit;
Label1: TLabel;
Label2: TLabel;
RadioGroup1: TRadioGroup;
TextLabel: TLabel;
ReplaceLabel: TLabel;
DirectionRadioGroup: TRadioGroup;
procedure btnReplaceAllClick(Sender: TObject);
private
ReplOwner: TReplaceDialog;
@ -72,17 +72,17 @@ begin
2:ReplOwner.FOptions:=ReplOwner.FOptions + [frReplace];
3:ReplOwner.FOptions:=ReplOwner.FOptions + [frReplaceAll];
end;
if RadioGroup1.ItemIndex = 0 then
if DirectionRadioGroup.ItemIndex = 0 then
ReplOwner.FOptions:=ReplOwner.FOptions + [frDown]
else
ReplOwner.FOptions:=ReplOwner.FOptions - [frDown];
if CheckBox1.Checked then
if WholeWordsOnlyCheckBox.Checked then
ReplOwner.FOptions:=ReplOwner.FOptions + [frWholeWord]
else
ReplOwner.FOptions:=ReplOwner.FOptions - [frWholeWord];
if CheckBox2.Checked then
if CaseSensitiveCheckBox.Checked then
ReplOwner.FOptions:=ReplOwner.FOptions + [frMatchCase]
else
ReplOwner.FOptions:=ReplOwner.FOptions - [frMatchCase];

View File

@ -22,14 +22,14 @@ type
{ TFindDialogForm }
TFindDialogForm = class(TForm)
btnFind: TButton;
Button2: TButton;
btnHelp: TButton;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
FindButton: TButton;
CancelButton: TButton;
HelpButton: TButton;
WholeWordsOnlyCheckBox: TCheckBox;
CaseSensitiveCheckBox: TCheckBox;
EditFind: TEdit;
Label1: TLabel;
RadioGroup1: TRadioGroup;
FindLabel: TLabel;
DirectionRadioGroup: TRadioGroup;
procedure EditFindChange(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
@ -38,7 +38,7 @@ type
procedure TFindDialogForm.EditFindChange(Sender: TObject);
begin
btnFind.Enabled:=EditFind.Text<>'';
FindButton.Enabled:=EditFind.Text<>'';
end;
procedure TFindDialogForm.FormCreate(Sender: TObject);
@ -76,17 +76,17 @@ begin
begin
FOptions:=FOptions + [frFindNext];
FFindText:=EditFind.Text;
if RadioGroup1.ItemIndex = 0 then
if DirectionRadioGroup.ItemIndex = 0 then
FOptions:=FOptions + [frDown]
else
FOptions:=FOptions - [frDown];
if CheckBox1.Checked then
if WholeWordsOnlyCheckBox.Checked then
FOptions:=FOptions + [frWholeWord]
else
FOptions:=FOptions - [frWholeWord];
if CheckBox2.Checked then
if CaseSensitiveCheckBox.Checked then
FOptions:=FOptions + [frMatchCase]
else
FOptions:=FOptions - [frMatchCase];
@ -164,25 +164,36 @@ end;
function TFindDialog.CreateForm: TForm;
begin
Result:=TFindDialogForm.Create(Application);
Result:=TFindDialogForm.Create(Self);
with TFindDialogForm(Result) do begin
FindButton.Caption:=rsFind;
CancelButton.Caption:=rsMbCancel;
HelpButton.Caption:=ifsVK_HELP;
WholeWordsOnlyCheckBox.Caption:=rsWholeWordsOnly;
CaseSensitiveCheckBox.Caption:=rsCaseSensitive;
FindLabel.Caption:=rsText;
DirectionRadioGroup.Caption:=rsDirection;
DirectionRadioGroup.Items[0]:=rsForward;
DirectionRadioGroup.Items[1]:=rsBackward;
end;
end;
procedure TFindDialog.UpdateValues;
begin
TFindDialogForm(FFindForm).EditFind.Text:=FFindText;
TFindDialogForm(FFindForm).CheckBox1.Checked:=frWholeWord in Options;
TFindDialogForm(FFindForm).CheckBox2.Checked:=frMatchCase in Options;
TFindDialogForm(FFindForm).RadioGroup1.ItemIndex:=ord(frDown in Options);
TFindDialogForm(FFindForm).WholeWordsOnlyCheckBox.Checked:=frWholeWord in Options;
TFindDialogForm(FFindForm).CaseSensitiveCheckBox.Checked:=frMatchCase in Options;
TFindDialogForm(FFindForm).DirectionRadioGroup.ItemIndex:=ord(frDown in Options);
TFindDialogForm(FFindForm).CheckBox1.Enabled:=not (frDisableWholeWord in Options);
TFindDialogForm(FFindForm).CheckBox2.Enabled:=not (frDisableMatchCase in Options);
TFindDialogForm(FFindForm).RadioGroup1.Enabled:=not (frDisableUpDown in Options);
TFindDialogForm(FFindForm).WholeWordsOnlyCheckBox.Enabled:=not (frDisableWholeWord in Options);
TFindDialogForm(FFindForm).CaseSensitiveCheckBox.Enabled:=not (frDisableMatchCase in Options);
TFindDialogForm(FFindForm).DirectionRadioGroup.Enabled:=not (frDisableUpDown in Options);
TFindDialogForm(FFindForm).CheckBox1.Visible:=not (frHideWholeWord in Options);
TFindDialogForm(FFindForm).CheckBox2.Visible:=not (frHideMatchCase in Options);
TFindDialogForm(FFindForm).RadioGroup1.Visible:=not (frHideUpDown in Options);
TFindDialogForm(FFindForm).btnHelp.Visible:=(frShowHelp in Options);
TFindDialogForm(FFindForm).WholeWordsOnlyCheckBox.Visible:=not (frHideWholeWord in Options);
TFindDialogForm(FFindForm).CaseSensitiveCheckBox.Visible:=not (frHideMatchCase in Options);
TFindDialogForm(FFindForm).DirectionRadioGroup.Visible:=not (frHideUpDown in Options);
TFindDialogForm(FFindForm).HelpButton.Visible:=(frShowHelp in Options);
end;
constructor TFindDialog.Create(AOwner: TComponent);
@ -217,3 +228,4 @@ begin
end;
end;

View File

@ -22,18 +22,18 @@ type
{ TReplaceDialogForm }
TReplaceDialogForm = class(TForm)
Button1: TButton;
btnReplace: TButton;
btnReplaceAll: TButton;
Button4: TButton;
btnHelp: TButton;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
FindMoreButton: TButton;
ReplaceButton: TButton;
ReplaceAllButton: TButton;
CancelButton: TButton;
HelpButton: TButton;
WholeWordsOnlyCheckBox: TCheckBox;
CaseSensitiveCheckBox: TCheckBox;
EditFind: TEdit;
EditReplace: TEdit;
Label1: TLabel;
Label2: TLabel;
RadioGroup1: TRadioGroup;
TextLabel: TLabel;
ReplaceLabel: TLabel;
DirectionRadioGroup: TRadioGroup;
procedure btnReplaceAllClick(Sender: TObject);
private
ReplOwner: TReplaceDialog;
@ -47,17 +47,17 @@ begin
2:ReplOwner.FOptions:=ReplOwner.FOptions + [frReplace];
3:ReplOwner.FOptions:=ReplOwner.FOptions + [frReplaceAll];
end;
if RadioGroup1.ItemIndex = 0 then
if DirectionRadioGroup.ItemIndex = 0 then
ReplOwner.FOptions:=ReplOwner.FOptions + [frDown]
else
ReplOwner.FOptions:=ReplOwner.FOptions - [frDown];
if CheckBox1.Checked then
if WholeWordsOnlyCheckBox.Checked then
ReplOwner.FOptions:=ReplOwner.FOptions + [frWholeWord]
else
ReplOwner.FOptions:=ReplOwner.FOptions - [frWholeWord];
if CheckBox2.Checked then
if CaseSensitiveCheckBox.Checked then
ReplOwner.FOptions:=ReplOwner.FOptions + [frMatchCase]
else
ReplOwner.FOptions:=ReplOwner.FOptions - [frMatchCase];
@ -82,27 +82,44 @@ end;
function TReplaceDialog.CreateForm: TForm;
begin
Result:=TReplaceDialogForm.Create(Application);
Result:=TReplaceDialogForm.Create(Self);
with TReplaceDialogForm(Result) do begin
FindMoreButton.Caption:=rsFindMore;
ReplaceButton.Caption:=rsReplace;
ReplaceAllButton.Caption:=rsReplaceAll;
CancelButton.Caption:=rsMbCancel;
HelpButton.Caption:=ifsVK_HELP;
WholeWordsOnlyCheckBox.Caption:=rsWholeWordsOnly;
CaseSensitiveCheckBox.Caption:=rsCaseSensitive;
TextLabel.Caption:=rsText;
ReplaceLabel.Caption:=rsReplace;
DirectionRadioGroup.Caption:=rsDirection;
DirectionRadioGroup.Items[0]:=rsForward;
DirectionRadioGroup.Items[1]:=rsBackward;
end;
TReplaceDialogForm(Result).ReplOwner:=Self;
end;
procedure TReplaceDialog.UpdateValues;
var
dlg: TReplaceDialogForm;
begin
TReplaceDialogForm(FFindForm).EditFind.Text:=FFindText;
TReplaceDialogForm(FFindForm).EditReplace.Text:=FReplaceText;
dlg:=TReplaceDialogForm(FFindForm);
dlg.EditFind.Text:=FFindText;
dlg.EditReplace.Text:=FReplaceText;
TReplaceDialogForm(FFindForm).CheckBox1.Checked:=frWholeWord in Options;
TReplaceDialogForm(FFindForm).CheckBox2.Checked:=frMatchCase in Options;
TReplaceDialogForm(FFindForm).RadioGroup1.ItemIndex:=ord(frDown in Options);
dlg.WholeWordsOnlyCheckBox.Checked:=frWholeWord in Options;
dlg.CaseSensitiveCheckBox.Checked:=frMatchCase in Options;
dlg.DirectionRadioGroup.ItemIndex:=ord(frDown in Options);
TReplaceDialogForm(FFindForm).CheckBox1.Enabled:=not (frDisableWholeWord in Options);
TReplaceDialogForm(FFindForm).CheckBox2.Enabled:=not (frDisableMatchCase in Options);
TReplaceDialogForm(FFindForm).RadioGroup1.Enabled:=not (frDisableUpDown in Options);
dlg.WholeWordsOnlyCheckBox.Enabled:=not (frDisableWholeWord in Options);
dlg.CaseSensitiveCheckBox.Enabled:=not (frDisableMatchCase in Options);
dlg.DirectionRadioGroup.Enabled:=not (frDisableUpDown in Options);
TReplaceDialogForm(FFindForm).CheckBox1.Visible:=not (frHideWholeWord in Options);
TReplaceDialogForm(FFindForm).CheckBox2.Visible:=not (frHideMatchCase in Options);
TReplaceDialogForm(FFindForm).RadioGroup1.Visible:=not (frHideUpDown in Options);
TReplaceDialogForm(FFindForm).btnHelp.Visible:=(frShowHelp in Options);
dlg.WholeWordsOnlyCheckBox.Visible:=not (frHideWholeWord in Options);
dlg.CaseSensitiveCheckBox.Visible:=not (frHideMatchCase in Options);
dlg.DirectionRadioGroup.Visible:=not (frHideUpDown in Options);
dlg.HelpButton.Visible:=(frShowHelp in Options);
end;
constructor TReplaceDialog.Create(AOwner: TComponent);
@ -111,3 +128,4 @@ begin
Options:=Options + [frReplace, frReplaceAll];
end;

View File

@ -67,6 +67,7 @@ ResourceString
rsfdDirectoryMustExist = 'Directory must exist';
rsfdFileNotExist = 'The file "%s" does not exist.';
rsfdDirectoryNotExist = 'The directory "%s" does not exist.';
rsFind = 'Find';
rsfdFileReadOnlyTitle = 'File is not writable';
rsfdFileReadOnly = 'The file "%s" is not writable.';
rsfdFileSaveAs = 'Save file as';
@ -78,6 +79,9 @@ ResourceString
// Select font dialog
rsSelectFontTitle = 'Select a font';
rsFindMore = 'Find more';
rsReplace = 'Replace';
rsReplaceAll = 'Replace all';
// gtk interface
rsWarningUnremovedPaintMessages = ' WARNING: There are %s unremoved LM_'
@ -239,6 +243,12 @@ ResourceString
ifsVK_INSERT = 'Insert';
ifsVK_DELETE = 'Delete'; //= dlgeddelete
ifsVK_HELP = 'Help';
rsWholeWordsOnly = 'Whole words only';
rsCaseSensitive = 'Case sensitive';
rsText = 'Text';
rsDirection = 'Direction';
rsForward = 'Forward';
rsBackward = 'Backward';
ifsVK_LWIN = 'left windows key';
ifsVK_RWIN = 'right windows key';
ifsVK_APPS = 'application key';