diff --git a/ide/findinfilesdlg.lfm b/ide/findinfilesdlg.lfm index 9f23f65301..b060705ab6 100644 --- a/ide/findinfilesdlg.lfm +++ b/ide/findinfilesdlg.lfm @@ -1,41 +1,43 @@ object LazFindInFilesDialog: TLazFindInFilesDialog - ActiveControl = TextToFindComboBox - Caption = 'Find in files' - ClientHeight = 423 - ClientWidth = 385 - Constraints.MinHeight = 400 - Constraints.MinWidth = 260 - OnCreate = FormCreate - PixelsPerInch = 112 - Position = poScreenCenter - HorzScrollBar.Page = 384 - VertScrollBar.Page = 422 Left = 391 Height = 423 Top = 158 Width = 385 + HorzScrollBar.Page = 384 + VertScrollBar.Page = 422 + ActiveControl = TextToFindComboBox + Caption = 'Find in files' + Constraints.MinHeight = 400 + Constraints.MinWidth = 260 + OnCreate = FormCreate + Position = poScreenCenter object TextToFindLabel: TLabel - Caption = 'Text To Find:' - Color = clNone - ParentColor = False AnchorSideTop.Control = TextToFindComboBox AnchorSideTop.Side = asrCenter Left = 6 Height = 13 Top = 10 Width = 74 + Caption = 'Text To Find:' + Color = clNone + ParentColor = False end object TextToFindComboBox: TComboBox - Anchors = [akTop, akLeft, akRight] - AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] - MaxLength = 0 - TabOrder = 0 Left = 102 Height = 21 Top = 6 Width = 277 + Anchors = [akTop, akLeft, akRight] + AutoComplete = True + AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending] + MaxLength = 0 + TabOrder = 0 end object OptionsCheckGroupBox: TCheckGroup + Left = 6 + Height = 86 + Top = 65 + Width = 373 Anchors = [akTop, akLeft, akRight] AutoFill = True BorderSpacing.InnerBorder = 6 @@ -56,15 +58,15 @@ object LazFindInFilesDialog: TLazFindInFilesDialog 'Regular expressions' ) TabOrder = 1 - Left = 6 - Height = 86 - Top = 65 - Width = 373 Data = { 03000000020202 } end object WhereRadioGroup: TRadioGroup + Left = 6 + Height = 82 + Top = 155 + Width = 373 Anchors = [akTop, akLeft, akRight] AutoFill = True Caption = 'Where' @@ -86,137 +88,130 @@ object LazFindInFilesDialog: TLazFindInFilesDialog ) OnClick = WhereRadioGroupClick TabOrder = 2 - Left = 6 - Height = 82 - Top = 155 - Width = 373 end object DirectoryOptionsGroupBox: TGroupBox - Anchors = [akTop, akLeft, akRight, akBottom] - Caption = 'Directory Options' - ClientHeight = 120 - ClientWidth = 369 - Enabled = False - TabOrder = 3 Left = 6 Height = 137 Top = 240 Width = 373 + Anchors = [akTop, akLeft, akRight, akBottom] + Caption = 'Directory Options' + Enabled = False + TabOrder = 3 object DirectoryLabel: TLabel - Caption = 'Directory:' - Color = clNone - ParentColor = False Left = 6 Height = 13 Top = 8 Width = 55 - end - object FileMaskLabel: TLabel - Caption = 'File mask (*;*.*;*.bak?):' + Caption = 'Directory:' Color = clNone ParentColor = False + end + object FileMaskLabel: TLabel Left = 6 Height = 13 Top = 38 Width = 128 + Caption = 'File mask (*;*.*;*.bak?):' + Color = clNone + ParentColor = False end object DirectoryComboBox: TComboBox + Left = 88 + Height = 21 + Top = 6 + Width = 241 Anchors = [akTop, akLeft, akRight] AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] MaxLength = 0 TabOrder = 0 - Left = 88 - Height = 21 - Top = 6 - Width = 245 end object DirectoryBrowse: TBitBtn + Left = 335 + Height = 21 + Top = 6 + Width = 21 Anchors = [akTop, akRight] - Caption = '...' Layout = blGlyphTop NumGlyphs = 0 OnClick = DirectoryBrowseClick TabOrder = 1 - Left = 339 - Height = 21 - Top = 6 - Width = 21 end object FileMaskComboBox: TComboBox + Left = 6 + Height = 21 + Top = 56 + Width = 323 Anchors = [akTop, akLeft, akRight] AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] MaxLength = 0 TabOrder = 2 Text = '*.pas;*.pp;*.inc' - Left = 6 - Height = 21 - Top = 56 - Width = 327 end object IncludeSubDirsCheckBox: TCheckBox - Caption = 'Include sub directories' - TabOrder = 3 Left = 6 Height = 24 Top = 92 Width = 154 + Caption = 'Include sub directories' + TabOrder = 3 end end object OKButton: TButton - Anchors = [akRight, akBottom] - BorderSpacing.Around = 6 - - Caption = 'OK' - Default = True - ModalResult = 1 - TabOrder = 4 Left = 221 Height = 25 Top = 391 Width = 75 - end - object CancelButton: TButton Anchors = [akRight, akBottom] BorderSpacing.Around = 6 - - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 5 + BorderSpacing.InnerBorder = 4 + Caption = 'OK' + Default = True + ModalResult = 1 + TabOrder = 4 + end + object CancelButton: TButton Left = 304 Height = 25 Top = 391 Width = 75 + Anchors = [akRight, akBottom] + BorderSpacing.Around = 6 + BorderSpacing.InnerBorder = 4 + Cancel = True + Caption = 'Cancel' + ModalResult = 2 + TabOrder = 5 end object ReplaceTextComboBox: TComboBox - Anchors = [akTop, akLeft, akRight] - AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] - Enabled = False - MaxLength = 0 - TabOrder = 6 Left = 102 Height = 25 Top = 33 Width = 277 + Anchors = [akTop, akLeft, akRight] + AutoComplete = True + AutoCompleteText = [cbactEnabled, cbactEndOfLineComplete, cbactRetainPrefixCase, cbactSearchAscending] + Enabled = False + MaxLength = 0 + TabOrder = 6 end object ReplaceCheckBox: TCheckBox + AnchorSideTop.Control = ReplaceTextComboBox + AnchorSideTop.Side = asrCenter + Left = 5 + Height = 20 + Top = 35 + Width = 73 Caption = 'Replace' Enabled = False OnChange = ReplaceCheckBoxChange TabOrder = 7 - AnchorSideTop.Control = ReplaceTextComboBox - AnchorSideTop.Side = asrCenter - Left = 5 - Height = 24 - Top = 33 - Width = 73 end object SelectDirectoryDialog: TSelectDirectoryDialog - Options = [ofFileMustExist, ofEnableSizing, ofViewDetail] Title = 'Select Directory' FilterIndex = 0 - Title = 'Select Directory' + Options = [ofFileMustExist, ofEnableSizing, ofViewDetail] left = 260 top = 215 end diff --git a/ide/findinfilesdlg.lrs b/ide/findinfilesdlg.lrs index 679b9165a3..c9bf4548bb 100644 --- a/ide/findinfilesdlg.lrs +++ b/ide/findinfilesdlg.lrs @@ -1,74 +1,77 @@ +{ This is an automatically generated lazarus resource file } + LazarusResources.Add('TLazFindInFilesDialog','FORMDATA',[ - 'TPF0'#21'TLazFindInFilesDialog'#20'LazFindInFilesDialog'#13'ActiveControl'#7 - +#18'TextToFindComboBox'#7'Caption'#6#13'Find in files'#12'ClientHeight'#3#167 - +#1#11'ClientWidth'#3#129#1#21'Constraints.MinHeight'#3#144#1#20'Constraints.' - +'MinWidth'#3#4#1#8'OnCreate'#7#10'FormCreate'#13'PixelsPerInch'#2'p'#8'Posit' - +'ion'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#128#1#18'VertScrollBar.P' - +'age'#3#166#1#4'Left'#3#135#1#6'Height'#3#167#1#3'Top'#3#158#0#5'Width'#3#129 - +#1#0#6'TLabel'#15'TextToFindLabel'#7'Caption'#6#13'Text To Find:'#5'Color'#7 - +#6'clNone'#11'ParentColor'#8#21'AnchorSideTop.Control'#7#18'TextToFindComboB' - +'ox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height'#2#13#3'Top' - +#2#10#5'Width'#2'J'#0#0#9'TComboBox'#18'TextToFindComboBox'#7'Anchors'#11#5 + 'TPF0'#21'TLazFindInFilesDialog'#20'LazFindInFilesDialog'#4'Left'#3#135#1#6'H' + +'eight'#3#167#1#3'Top'#3#158#0#5'Width'#3#129#1#18'HorzScrollBar.Page'#3#128 + +#1#18'VertScrollBar.Page'#3#166#1#13'ActiveControl'#7#18'TextToFindComboBox' + +#7'Caption'#6#13'Find in files'#21'Constraints.MinHeight'#3#144#1#20'Constra' + +'ints.MinWidth'#3#4#1#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreen' + +'Center'#0#6'TLabel'#15'TextToFindLabel'#21'AnchorSideTop.Control'#7#18'Text' + +'ToFindComboBox'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#2#6#6'Height' + +#2#13#3'Top'#2#10#5'Width'#2'J'#7'Caption'#6#13'Text To Find:'#5'Color'#7#6 + +'clNone'#11'ParentColor'#8#0#0#9'TComboBox'#18'TextToFindComboBox'#4'Left'#2 + +'f'#6'Height'#2#21#3'Top'#2#6#5'Width'#3#21#1#7'Anchors'#11#5'akTop'#6'akLef' + +'t'#7'akRight'#0#12'AutoComplete'#9#16'AutoCompleteText'#11#12'cbactEnabled' + +#22'cbactEndOfLineComplete'#21'cbactRetainPrefixCase'#20'cbactSearchAscendin' + +'g'#0#9'MaxLength'#2#0#8'TabOrder'#2#0#0#0#11'TCheckGroup'#20'OptionsCheckGr' + +'oupBox'#4'Left'#2#6#6'Height'#2'V'#3'Top'#2'A'#5'Width'#3'u'#1#7'Anchors'#11 + +#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoFill'#9#25'BorderSpacing.InnerBorder' + +#2#6#7'Caption'#6#7'Options'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSi' + +'zing.TopBottomSpacing'#2#6#29'ChildSizing.HorizontalSpacing'#2#6#27'ChildSi' + +'zing.VerticalSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogen' + +'ousChildResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResi' + +'ze'#28'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.Sh' + +'rinkVertical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRig' + +'htThenTopToBottom'#27'ChildSizing.ControlsPerLine'#2#1#13'Items.Strings'#1#6 + +#14'Case sensitive'#6#16'Whole words only'#6#19'Regular expressions'#0#8'Tab' + +'Order'#2#1#4'Data'#10#7#0#0#0#3#0#0#0#2#2#2#0#0#11'TRadioGroup'#15'WhereRad' + +'ioGroup'#4'Left'#2#6#6'Height'#2'R'#3'Top'#3#155#0#5'Width'#3'u'#1#7'Anchor' + +'s'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoFill'#9#7'Caption'#6#5'Where'#28 + +'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'C' + +'hildSizing.HorizontalSpacing'#2#6#27'ChildSizing.VerticalSpacing'#2#6#29'Ch' + +'ildSizing.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.' + +'EnlargeVertical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizo' + +'ntal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChil' + +'ds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizi' + +'ng.ControlsPerLine'#2#1#9'ItemIndex'#2#1#13'Items.Strings'#1#6#27'search al' + +'l files in project'#6#21'search all open files'#6#21'search in directories' + +#0#7'OnClick'#7#20'WhereRadioGroupClick'#8'TabOrder'#2#2#0#0#9'TGroupBox'#24 + +'DirectoryOptionsGroupBox'#4'Left'#2#6#6'Height'#3#137#0#3'Top'#3#240#0#5'Wi' + +'dth'#3'u'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBottom'#0#7'Cap' + +'tion'#6#17'Directory Options'#7'Enabled'#8#8'TabOrder'#2#3#0#6'TLabel'#14'D' + +'irectoryLabel'#4'Left'#2#6#6'Height'#2#13#3'Top'#2#8#5'Width'#2'7'#7'Captio' + +'n'#6#10'Directory:'#5'Color'#7#6'clNone'#11'ParentColor'#8#0#0#6'TLabel'#13 + +'FileMaskLabel'#4'Left'#2#6#6'Height'#2#13#3'Top'#2'&'#5'Width'#3#128#0#7'Ca' + +'ption'#6#25'File mask (*;*.*;*.bak?):'#5'Color'#7#6'clNone'#11'ParentColor' + +#8#0#0#9'TComboBox'#17'DirectoryComboBox'#4'Left'#2'X'#6'Height'#2#21#3'Top' + +#2#6#5'Width'#3#241#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#16'AutoC' + +'ompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#9'Max' + +'Length'#2#0#8'TabOrder'#2#0#0#0#7'TBitBtn'#15'DirectoryBrowse'#4'Left'#3'O' + +#1#6'Height'#2#21#3'Top'#2#6#5'Width'#2#21#7'Anchors'#11#5'akTop'#7'akRight' + +#0#7'Caption'#6#3'...'#6'Layout'#7#10'blGlyphTop'#9'NumGlyphs'#2#0#7'OnClick' + +#7#20'DirectoryBrowseClick'#8'TabOrder'#2#1#0#0#9'TComboBox'#16'FileMaskComb' + +'oBox'#4'Left'#2#6#6'Height'#2#21#3'Top'#2'8'#5'Width'#3'C'#1#7'Anchors'#11#5 +'akTop'#6'akLeft'#7'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComp' - +'lete'#20'cbactSearchAscending'#0#9'MaxLength'#2#0#8'TabOrder'#2#0#4'Left'#2 - +'f'#6'Height'#2#21#3'Top'#2#6#5'Width'#3#21#1#0#0#11'TCheckGroup'#20'Options' - +'CheckGroupBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoFill'#9 - +#25'BorderSpacing.InnerBorder'#2#6#7'Caption'#6#7'Options'#28'ChildSizing.Le' - +'ftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing.Hor' - +'izontalSpacing'#2#6#27'ChildSizing.VerticalSpacing'#2#6#29'ChildSizing.Enla' - +'rgeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVertica' - +'l'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14'crs' - +'ScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'ChildSi' - +'zing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.ControlsPer' - +'Line'#2#1#13'Items.Strings'#1#6#14'Case sensitive'#6#16'Whole words only'#6 - +#19'Regular expressions'#0#8'TabOrder'#2#1#4'Left'#2#6#6'Height'#2'V'#3'Top' - +#2'A'#5'Width'#3'u'#1#4'Data'#10#7#0#0#0#3#0#0#0#2#2#2#0#0#11'TRadioGroup'#15 - +'WhereRadioGroup'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoFill'#9 - +#7'Caption'#6#5'Where'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.T' - +'opBottomSpacing'#2#6#29'ChildSizing.HorizontalSpacing'#2#6#27'ChildSizing.V' - +'erticalSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChi' - +'ldResize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28 - +'ChildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVer' - +'tical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenT' - +'opToBottom'#27'ChildSizing.ControlsPerLine'#2#1#9'ItemIndex'#2#1#13'Items.S' - +'trings'#1#6#27'search all files in project'#6#21'search all open files'#6#21 - +'search in directories'#0#7'OnClick'#7#20'WhereRadioGroupClick'#8'TabOrder'#2 - +#2#4'Left'#2#6#6'Height'#2'R'#3'Top'#3#155#0#5'Width'#3'u'#1#0#0#9'TGroupBox' - +#24'DirectoryOptionsGroupBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8 - +'akBottom'#0#7'Caption'#6#17'Directory Options'#12'ClientHeight'#2'x'#11'Cli' - +'entWidth'#3'q'#1#7'Enabled'#8#8'TabOrder'#2#3#4'Left'#2#6#6'Height'#3#137#0 - +#3'Top'#3#240#0#5'Width'#3'u'#1#0#6'TLabel'#14'DirectoryLabel'#7'Caption'#6 - +#10'Directory:'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left'#2#6#6'Height' - +#2#13#3'Top'#2#8#5'Width'#2'7'#0#0#6'TLabel'#13'FileMaskLabel'#7'Caption'#6 - +#25'File mask (*;*.*;*.bak?):'#5'Color'#7#6'clNone'#11'ParentColor'#8#4'Left' - +#2#6#6'Height'#2#13#3'Top'#2'&'#5'Width'#3#128#0#0#0#9'TComboBox'#17'Directo' - +'ryComboBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#16'AutoCompleteTe' - +'xt'#11#22'cbactEndOfLineComplete'#20'cbactSearchAscending'#0#9'MaxLength'#2 - +#0#8'TabOrder'#2#0#4'Left'#2'X'#6'Height'#2#21#3'Top'#2#6#5'Width'#3#245#0#0 - +#0#7'TBitBtn'#15'DirectoryBrowse'#7'Anchors'#11#5'akTop'#7'akRight'#0#7'Capt' - +'ion'#6#3'...'#6'Layout'#7#10'blGlyphTop'#9'NumGlyphs'#2#0#7'OnClick'#7#20'D' - +'irectoryBrowseClick'#8'TabOrder'#2#1#4'Left'#3'S'#1#6'Height'#2#21#3'Top'#2 - +#6#5'Width'#2#21#0#0#9'TComboBox'#16'FileMaskComboBox'#7'Anchors'#11#5'akTop' - +#6'akLeft'#7'akRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20 - +'cbactSearchAscending'#0#9'MaxLength'#2#0#8'TabOrder'#2#2#4'Text'#6#16'*.pas' - +';*.pp;*.inc'#4'Left'#2#6#6'Height'#2#21#3'Top'#2'8'#5'Width'#3'G'#1#0#0#9'T' - +'CheckBox'#22'IncludeSubDirsCheckBox'#7'Caption'#6#23'Include sub directorie' - +'s'#8'TabOrder'#2#3#4'Left'#2#6#6'Height'#2#24#3'Top'#2'\'#5'Width'#3#154#0#0 - +#0#0#7'TButton'#8'OKButton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'Border' - +'Spacing.Around'#2#6#7'Caption'#6#2'OK'#7'Default'#9#11'ModalResult'#2#1#8'T' - +'abOrder'#2#4#4'Left'#3#221#0#6'Height'#2#25#3'Top'#3#135#1#5'Width'#2'K'#0#0 - +#7'TButton'#12'CancelButton'#7'Anchors'#11#7'akRight'#8'akBottom'#0#20'Borde' - +'rSpacing.Around'#2#6#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult'#2#2 - +#8'TabOrder'#2#5#4'Left'#3'0'#1#6'Height'#2#25#3'Top'#3#135#1#5'Width'#2'K'#0 - +#0#9'TComboBox'#19'ReplaceTextComboBox'#7'Anchors'#11#5'akTop'#6'akLeft'#7'a' - +'kRight'#0#16'AutoCompleteText'#11#22'cbactEndOfLineComplete'#20'cbactSearch' - +'Ascending'#0#7'Enabled'#8#9'MaxLength'#2#0#8'TabOrder'#2#6#4'Left'#2'f'#6'H' - ,'eight'#2#25#3'Top'#2'!'#5'Width'#3#21#1#0#0#9'TCheckBox'#15'ReplaceCheckBox' + +'lete'#20'cbactSearchAscending'#0#9'MaxLength'#2#0#8'TabOrder'#2#2#4'Text'#6 + +#16'*.pas;*.pp;*.inc'#0#0#9'TCheckBox'#22'IncludeSubDirsCheckBox'#4'Left'#2#6 + +#6'Height'#2#24#3'Top'#2'\'#5'Width'#3#154#0#7'Caption'#6#23'Include sub dir' + +'ectories'#8'TabOrder'#2#3#0#0#0#7'TButton'#8'OKButton'#4'Left'#3#221#0#6'He' + +'ight'#2#25#3'Top'#3#135#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBottom' + +#0#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption' + +#6#2'OK'#7'Default'#9#11'ModalResult'#2#1#8'TabOrder'#2#4#0#0#7'TButton'#12 + +'CancelButton'#4'Left'#3'0'#1#6'Height'#2#25#3'Top'#3#135#1#5'Width'#2'K'#7 + +'Anchors'#11#7'akRight'#8'akBottom'#0#20'BorderSpacing.Around'#2#6#25'Border' + +'Spacing.InnerBorder'#2#4#6'Cancel'#9#7'Caption'#6#6'Cancel'#11'ModalResult' + +#2#2#8'TabOrder'#2#5#0#0#9'TComboBox'#19'ReplaceTextComboBox'#4'Left'#2'f'#6 + +'Height'#2#25#3'Top'#2'!'#5'Width'#3#21#1#7'Anchors'#11#5'akTop'#6'akLeft'#7 + +'akRight'#0#12'AutoComplete'#9#16'AutoCompleteText'#11#12'cbactEnabled'#22'c' + ,'bactEndOfLineComplete'#21'cbactRetainPrefixCase'#20'cbactSearchAscending'#0 + +#7'Enabled'#8#9'MaxLength'#2#0#8'TabOrder'#2#6#0#0#9'TCheckBox'#15'ReplaceCh' + +'eckBox'#21'AnchorSideTop.Control'#7#19'ReplaceTextComboBox'#18'AnchorSideTo' + +'p.Side'#7#9'asrCenter'#4'Left'#2#5#6'Height'#2#20#3'Top'#2'#'#5'Width'#2'I' +#7'Caption'#6#7'Replace'#7'Enabled'#8#8'OnChange'#7#21'ReplaceCheckBoxChange' - +#8'TabOrder'#2#7#21'AnchorSideTop.Control'#7#19'ReplaceTextComboBox'#18'Anch' - +'orSideTop.Side'#7#9'asrCenter'#4'Left'#2#5#6'Height'#2#24#3'Top'#2'!'#5'Wid' - +'th'#2'I'#0#0#22'TSelectDirectoryDialog'#21'SelectDirectoryDialog'#7'Options' - +#11#15'ofFileMustExist'#14'ofEnableSizing'#12'ofViewDetail'#0#5'Title'#6#16 - +'Select Directory'#11'FilterIndex'#2#0#5'Title'#6#16'Select Directory'#4'lef' - +'t'#3#4#1#3'top'#3#215#0#0#0#0 + +#8'TabOrder'#2#7#0#0#22'TSelectDirectoryDialog'#21'SelectDirectoryDialog'#5 + +'Title'#6#16'Select Directory'#11'FilterIndex'#2#0#7'Options'#11#15'ofFileMu' + +'stExist'#14'ofEnableSizing'#12'ofViewDetail'#0#4'left'#3#4#1#3'top'#3#215#0 + +#0#0#0 ]); diff --git a/ide/findinfilesdlg.pas b/ide/findinfilesdlg.pas index 216937e457..02d31c49bf 100644 --- a/ide/findinfilesdlg.pas +++ b/ide/findinfilesdlg.pas @@ -103,7 +103,9 @@ end; procedure TLazFindInFilesDialog.DirectoryBrowseClick(Sender: TObject); begin InitIDEFileDialog(SelectDirectoryDialog); - SelectDirectoryDialog.InitialDir := GetCurrentDir; + if DirectoryExists(DirectoryComboBox.Text) then + SelectDirectoryDialog.InitialDir := DirectoryComboBox.Text else + SelectDirectoryDialog.InitialDir := GetCurrentDir; if SelectDirectoryDialog.Execute then DirectoryComboBox.Text := SelectDirectoryDialog.FileName; StoreIDEFileDialog(SelectDirectoryDialog); diff --git a/ide/searchresultview.lfm b/ide/searchresultview.lfm index 3b07c8939a..3ea24a0c6d 100644 --- a/ide/searchresultview.lfm +++ b/ide/searchresultview.lfm @@ -1,42 +1,89 @@ object SearchResultsView: TSearchResultsView - ActiveControl = btnSearchAgain - Caption = 'SearchResultsView' - ClientHeight = 229 - ClientWidth = 799 - OnCreate = Form1Create - OnDestroy = SearchResultsViewDestroy - OnKeyDown = ListBoxKeyDown - PixelsPerInch = 112 - Position = poScreenCenter - HorzScrollBar.Page = 798 - VertScrollBar.Page = 228 - Left = 267 + Left = 217 Height = 229 Top = 482 Width = 799 + HorzScrollBar.Page = 798 + VertScrollBar.Page = 228 + ActiveControl = btnSearchAgain + Caption = 'SearchResultsView' + OnCreate = Form1Create + OnDestroy = SearchResultsViewDestroy + OnKeyDown = ListBoxKeyDown + Position = poScreenCenter object ResultsNoteBook: TNotebook - Align = alBottom - Anchors = [akTop, akLeft] - OnCloseTabClicked = ResultsNoteBookClosetabclicked - Options = [nboShowCloseButtons, nboMultiLine] AnchorSideTop.Control = btnSearchAgain AnchorSideTop.Side = asrBottom Height = 192 Top = 37 Width = 799 + Align = alBottom + Anchors = [akTop, akLeft] + OnCloseTabClicked = ResultsNoteBookClosetabclicked + OnPageChanged = ResultsNoteBookPageChanged + Options = [nboShowCloseButtons, nboMultiLine] end object btnSearchAgain: TButton - BorderSpacing.Around = 6 - - Caption = 'Search Again' - OnClick = btnSearchAgainClick - OnKeyDown = ListBoxKeyDown - TabOrder = 1 AnchorSideLeft.Control = Owner AnchorSideTop.Control = Owner Left = 6 Height = 25 Top = 6 Width = 115 + BorderSpacing.Around = 6 + BorderSpacing.InnerBorder = 4 + Caption = 'Search Again' + OnClick = btnSearchAgainClick + OnKeyDown = ListBoxKeyDown + TabOrder = 1 + end + object gbSearchPhraseInList: TGroupBox + Left = 237 + Height = 37 + Width = 562 + Align = alRight + Caption = 'Search or Filter Phrases In List' + TabOrder = 2 + object edSearchInList: TEdit + Height = 20 + Hint = 'Enter one or more phrases that you want'#10'to Search or Filter in the list,'#10'seperated by space ( '' '' ), or comma ( , )' + Width = 263 + Align = alClient + OnChange = edSearchInListChange + OnKeyDown = edSearchInListKeyDown + ParentShowHint = False + ShowHint = True + TabOrder = 0 + end + object bnForwardSearch: TButton + Left = 338 + Height = 20 + Width = 100 + Align = alRight + BorderSpacing.InnerBorder = 4 + Caption = 'Forward Search' + OnClick = bnForwardSearchClick + TabOrder = 1 + end + object bnResetResults: TButton + Left = 438 + Height = 20 + Width = 120 + Align = alRight + BorderSpacing.InnerBorder = 4 + Caption = 'Reset Result List' + OnClick = bnResetResultsClick + TabOrder = 2 + end + object bnFilter: TButton + Left = 263 + Height = 20 + Width = 75 + Align = alRight + BorderSpacing.InnerBorder = 4 + Caption = 'Filter' + OnClick = bnFilterClick + TabOrder = 3 + end end end diff --git a/ide/searchresultview.lrs b/ide/searchresultview.lrs index 3e64728717..eaa720b807 100644 --- a/ide/searchresultview.lrs +++ b/ide/searchresultview.lrs @@ -1,17 +1,35 @@ +{ This is an automatically generated lazarus resource file } + LazarusResources.Add('TSearchResultsView','FORMDATA',[ - 'TPF0'#18'TSearchResultsView'#17'SearchResultsView'#13'ActiveControl'#7#14'bt' - +'nSearchAgain'#7'Caption'#6#17'SearchResultsView'#12'ClientHeight'#3#229#0#11 - +'ClientWidth'#3#31#3#8'OnCreate'#7#11'Form1Create'#9'OnDestroy'#7#24'SearchR' - +'esultsViewDestroy'#9'OnKeyDown'#7#14'ListBoxKeyDown'#13'PixelsPerInch'#2'p' - +#8'Position'#7#14'poScreenCenter'#18'HorzScrollBar.Page'#3#30#3#18'VertScrol' - +'lBar.Page'#3#228#0#4'Left'#3#11#1#6'Height'#3#229#0#3'Top'#3#226#1#5'Width' - +#3#31#3#0#9'TNotebook'#15'ResultsNoteBook'#5'Align'#7#8'alBottom'#7'Anchors' - +#11#5'akTop'#6'akLeft'#0#17'OnCloseTabClicked'#7#30'ResultsNoteBookClosetabc' - +'licked'#7'Options'#11#19'nboShowCloseButtons'#12'nboMultiLine'#0#21'AnchorS' - +'ideTop.Control'#7#14'btnSearchAgain'#18'AnchorSideTop.Side'#7#9'asrBottom'#6 - +'Height'#3#192#0#3'Top'#2'%'#5'Width'#3#31#3#0#0#7'TButton'#14'btnSearchAgai' - +'n'#20'BorderSpacing.Around'#2#6#7'Caption'#6#12'Search Again'#7'OnClick'#7 - +#19'btnSearchAgainClick'#9'OnKeyDown'#7#14'ListBoxKeyDown'#8'TabOrder'#2#1#22 - +'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'L' - +'eft'#2#6#6'Height'#2#25#3'Top'#2#6#5'Width'#2's'#0#0#0 + 'TPF0'#18'TSearchResultsView'#17'SearchResultsView'#4'Left'#3#217#0#6'Height' + +#3#229#0#3'Top'#3#226#1#5'Width'#3#31#3#18'HorzScrollBar.Page'#3#30#3#18'Ver' + +'tScrollBar.Page'#3#228#0#13'ActiveControl'#7#14'btnSearchAgain'#7'Caption'#6 + +#17'SearchResultsView'#8'OnCreate'#7#11'Form1Create'#9'OnDestroy'#7#24'Searc' + +'hResultsViewDestroy'#9'OnKeyDown'#7#14'ListBoxKeyDown'#8'Position'#7#14'poS' + +'creenCenter'#0#9'TNotebook'#15'ResultsNoteBook'#21'AnchorSideTop.Control'#7 + +#14'btnSearchAgain'#18'AnchorSideTop.Side'#7#9'asrBottom'#6'Height'#3#192#0#3 + +'Top'#2'%'#5'Width'#3#31#3#5'Align'#7#8'alBottom'#7'Anchors'#11#5'akTop'#6'a' + +'kLeft'#0#17'OnCloseTabClicked'#7#30'ResultsNoteBookClosetabclicked'#13'OnPa' + +'geChanged'#7#26'ResultsNoteBookPageChanged'#7'Options'#11#19'nboShowCloseBu' + +'ttons'#12'nboMultiLine'#0#0#0#7'TButton'#14'btnSearchAgain'#22'AnchorSideLe' + +'ft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#6#6'H' + +'eight'#2#25#3'Top'#2#6#5'Width'#2's'#20'BorderSpacing.Around'#2#6#25'Border' + +'Spacing.InnerBorder'#2#4#7'Caption'#6#12'Search Again'#7'OnClick'#7#19'btnS' + +'earchAgainClick'#9'OnKeyDown'#7#14'ListBoxKeyDown'#8'TabOrder'#2#1#0#0#9'TG' + +'roupBox'#20'gbSearchPhraseInList'#4'Left'#3#237#0#6'Height'#2'%'#5'Width'#3 + +'2'#2#5'Align'#7#7'alRight'#7'Caption'#6' Search or Filter Phrases In List'#8 + +'TabOrder'#2#2#0#5'TEdit'#14'edSearchInList'#6'Height'#2#20#4'Hint'#6'sEnter' + +' one or more phrases that you want'#10'to Search or Filter in the list,'#10 + +'seperated by space ( '' '' ), or comma ( , )'#5'Width'#3#7#1#5'Align'#7#8'a' + +'lClient'#8'OnChange'#7#20'edSearchInListChange'#9'OnKeyDown'#7#21'edSearchI' + +'nListKeyDown'#14'ParentShowHint'#8#8'ShowHint'#9#8'TabOrder'#2#0#0#0#7'TBut' + +'ton'#15'bnForwardSearch'#4'Left'#3'R'#1#6'Height'#2#20#5'Width'#2'd'#5'Alig' + +'n'#7#7'alRight'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#14'Forward S' + +'earch'#7'OnClick'#7#20'bnForwardSearchClick'#8'TabOrder'#2#1#0#0#7'TButton' + +#14'bnResetResults'#4'Left'#3#182#1#6'Height'#2#20#5'Width'#2'x'#5'Align'#7#7 + +'alRight'#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#17'Reset Result Lis' + +'t'#7'OnClick'#7#19'bnResetResultsClick'#8'TabOrder'#2#2#0#0#7'TButton'#8'bn' + +'Filter'#4'Left'#3#7#1#6'Height'#2#20#5'Width'#2'K'#5'Align'#7#7'alRight'#25 + +'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#6'Filter'#7'OnClick'#7#13'bnFil' + +'terClick'#8'TabOrder'#2#3#0#0#0#0 ]); diff --git a/ide/searchresultview.pp b/ide/searchresultview.pp index ddc7956e34..b095f8d753 100644 --- a/ide/searchresultview.pp +++ b/ide/searchresultview.pp @@ -90,9 +90,12 @@ type fSearchObject: TLazSearch; FSkipped: integer; fUpdateStrings: TStrings; + fBackUpStrings: TStrings; fUpdating: boolean; fUpdateCount: integer; fShortenPathNeeded: boolean; + FSearchInListPhrases: string; + fFiltered: Boolean; procedure SetSkipped(const AValue: integer); public constructor Create(AOwner: TComponent); override; @@ -101,6 +104,10 @@ type procedure BeginUpdate; procedure EndUpdate; procedure ShortenPaths; + procedure FreeObjects(var slItems: TStrings); + property BackUpStrings: TStrings read fBackUpStrings write fBackUpStrings; + property Filtered: Boolean read fFiltered write fFiltered; + property SearchInListPhrases: string read FSearchInListPhrases write FSearchInListPhrases; property UpdateItems: TStrings read fUpdateStrings write fUpdateStrings; property UpdateState: boolean read fUpdating; property Skipped: integer read FSkipped write SetSkipped; @@ -112,6 +119,11 @@ type TSearchResultsView = class(TForm) btnSearchAgain: TButton; ResultsNoteBook: TNotebook; + gbSearchPhraseInList: TGroupBox; + edSearchInList: TEdit; + bnForwardSearch: TButton; + bnResetResults: TButton; + bnFilter: TButton; procedure Form1Create(Sender: TObject); procedure ListBoxKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); procedure ResultsNoteBookClosetabclicked(Sender: TObject); @@ -124,6 +136,13 @@ type X, Y: Integer); Procedure LazLBMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer; MousePos: TPoint; var Handled: Boolean); + procedure edSearchInListChange (Sender: TObject ); + procedure ResultsNoteBookPageChanged (Sender: TObject ); + procedure bnForwardSearchClick (Sender: TObject ); + procedure bnResetResultsClick (Sender: TObject ); + procedure edSearchInListKeyDown (Sender: TObject; var Key: Word; + Shift: TShiftState ); + procedure bnFilterClick (Sender: TObject ); private FMaxItems: integer; function PageExists(const APageName: string): boolean; @@ -155,6 +174,7 @@ type const MatchStart: integer; const MatchLen: integer); procedure BeginUpdate(AIndex: integer); procedure EndUpdate(AIndex: integer); + procedure Parse_Search_Phrases(var slPhrases: TStrings); property ListBoxFont: TFont read fListBoxFont write fListBoxFont; property OnSelectionChanged: TNotifyEvent read fOnSelectionChanged write fOnSelectionChanged; @@ -172,6 +192,19 @@ implementation const SPACE = ' '; +function CopySearchMatchPos(var Src, Dest: TLazSearchMatchPos): Boolean; +begin + Result := False; + if ((Src = nil) or (Dest = nil)) then Exit; + Dest.MatchStart := Src.MatchStart; + Dest.MatchLen := Src.MatchLen; + Dest.Filename := Src.Filename; + Dest.FilePosition := Src.FilePosition; + Dest.TheText := Src.TheText; + Dest.ShownFilename := Dest.Filename; + Result := True; +end; + procedure TSearchResultsView.Form1Create(Sender: TObject); var ALayout: TIDEWindowLayout; @@ -230,6 +263,181 @@ begin Handled:= false; end;//LazLBMouseWheel +procedure TSearchResultsView.edSearchInListChange (Sender: TObject ); +var CurrentLB: TLazSearchResultLB; +begin + CurrentLB := GetListBox(ResultsNoteBook.PageIndex); + if Assigned(CurrentLB) then + CurrentLB.SearchInListPhrases := edSearchInList.Text; +end; + +procedure TSearchResultsView.ResultsNoteBookPageChanged (Sender: TObject ); +var CurrentLB: TLazSearchResultLB; +begin + CurrentLB := GetListBox(ResultsNoteBook.PageIndex); + if Assigned(CurrentLB) then + edSearchInList.Text := CurrentLB.SearchInListPhrases; +end; + +procedure TSearchResultsView.bnForwardSearchClick (Sender: TObject ); +var CurrentLB: TLazSearchResultLB; + slPhrases: TStrings; + i, j, iCurrentIndex: Integer; + S: string; +begin + CurrentLB := GetListBox(ResultsNoteBook.PageIndex); + if Assigned(CurrentLB) then + begin + if (Length(edSearchInList.Text) = 0) then Exit;//No Search Phrases specified. + if (CurrentLB.Items.Count <= 0) then Exit; + slPhrases := TStringList.Create; + try + iCurrentIndex := CurrentLB.ItemIndex + 1; + if (iCurrentIndex > CurrentLB.Items.Count) then iCurrentIndex := CurrentLB.Items.Count; + if (iCurrentIndex < 0) then iCurrentIndex := 0;//Set to 1st list-item if none are selected + //Parse Phrases + Parse_Search_Phrases(slPhrases); + if (slPhrases.Count > 0) then + begin + for i:=iCurrentIndex to CurrentLB.Items.Count-1 do + begin + S := UpperCase(CurrentLB.Items[i]);//for case-insensitive search + for j:=0 to slPhrases.Count-1 do + begin + if (Pos(slPhrases[j], S) <> 0) then + begin + CurrentLB.ItemIndex := i;//Set listbox's itemindex + CurrentLB.MakeCurrentVisible; + Exit;//Found what we looking for, exit + end;//End if (Pos(slPhrases[j], CurrentLB.Items[i]) <> 0) + end;//End for-loop j + end;//End for-loop i + end;//End if if (slPhrases.Count > 0) + finally + FreeAndNil(slPhrases); + edSearchInList.SetFocus; + end;//End try-finally + end;//End if Assigned(CurrentLB) +end; + +procedure TSearchResultsView.bnResetResultsClick (Sender: TObject ); +var i: Integer; + oObject: TObject; + CurrentLB: TLazSearchResultLB; + mpMatchPos, mpOrgMatchPos: TLazSearchMatchPos; +begin + CurrentLB := GetListBox(ResultsNoteBook.PageIndex); + try + if CurrentLB.Filtered then + begin + if (CurrentLB.Items.Count > 0) then + begin + CurrentLB.FreeObjects(CurrentLB.Items);//Free the objects + CurrentLB.Items.Clear; + end;//End if (CurrentLB.Items.Count > 0) + + if (CurrentLB.BackUpStrings.Count > 0) then + begin + for i:=0 to CurrentLB.BackUpStrings.Count-1 do + begin + oObject := CurrentLB.BackUpStrings.Objects[i]; + if not (oObject is TLazSearchMatchPos) then Continue; + mpOrgMatchPos := TLazSearchMatchPos(oObject); + if Assigned(mpOrgMatchPos) then + begin + mpMatchPos := TLazSearchMatchPos.Create; + if CopySearchMatchPos(mpOrgMatchPos, mpMatchPos) then + CurrentLB.Items.AddObject(CurrentLB.BackUpStrings[i], mpMatchPos); + end;//End if Assigned(mpOrgMatchPos) + end;//End for-loop i + end;//End if (CurrentLB.BackUpStrings.Count > 0) + CurrentLB.Filtered := False; + end;//End if CurrentLB.Filtered + finally + edSearchInList.SetFocus; + end;//End try-finally +end; + +procedure TSearchResultsView.edSearchInListKeyDown (Sender: TObject; + var Key: Word; Shift: TShiftState ); +begin + if (Key = VK_RETURN) then + bnForwardSearchClick(bnForwardSearch); +end; + +procedure TSearchResultsView.bnFilterClick (Sender: TObject ); +var CurrentLB: TLazSearchResultLB; + mpMatchPos, mpOrgMatchPos: TLazSearchMatchPos; + slPhrases: TStrings; + i, j: Integer; + S: string; + oObject: TObject; +begin + CurrentLB := GetListBox(ResultsNoteBook.PageIndex); + if Assigned(CurrentLB) then + begin + if (Length(edSearchInList.Text) = 0) then Exit;//No Filter Phrases specified. + slPhrases := TStringList.Create; + try + //Parse Phrases + Parse_Search_Phrases(slPhrases); + //BackUp Result List + if not (CurrentLB.Filtered or (CurrentLB.BackUpStrings.Count > 0)) then + begin + if (CurrentLB.Items.Count <= 1) then Exit; + for i:=0 to CurrentLB.Items.Count-1 do + begin + oObject := CurrentLB.Items.Objects[i]; + if not (oObject is TLazSearchMatchPos) then Continue; + mpOrgMatchPos := TLazSearchMatchPos(CurrentLB.Items.Objects[i]); + if Assigned(mpOrgMatchPos) then + begin + mpMatchPos := TLazSearchMatchPos.Create; + if CopySearchMatchPos(mpOrgMatchPos, mpMatchPos) then + CurrentLB.BackUpStrings.AddObject(CurrentLB.Items[i], mpMatchPos); + end;//End if Assigned(mpOrgMatchPos) + end;//End for-loop i + end;//End if not (CurrentLB.Filtered or (CurrentLB.BackUpStrings.Count > 0)) + + if (CurrentLB.BackUpStrings.Count <= 0) then Exit;//Empty list + + if (CurrentLB.Items.Count > 0) then + begin + CurrentLB.FreeObjects(CurrentLB.Items);//Free the objects + CurrentLB.Items.Clear;//Clear the list + end;//End if (CurrentLB.Items.Count > 0) + if (slPhrases.Count > 0) then + begin + for i:=0 to CurrentLB.BackUpStrings.Count-1 do + begin + S := UpperCase(CurrentLB.BackUpStrings[i]);//for case-insensitive search + for j:=0 to slPhrases.Count-1 do + begin + if (Pos(slPhrases[j], S) <> 0) then + begin + oObject := CurrentLB.BackUpStrings.Objects[i]; + if not (oObject is TLazSearchMatchPos) then Continue; + mpOrgMatchPos := TLazSearchMatchPos(CurrentLB.BackUpStrings.Objects[i]); + if Assigned(mpOrgMatchPos) then + begin + mpMatchPos := TLazSearchMatchPos.Create; + if CopySearchMatchPos(mpOrgMatchPos, mpMatchPos) then + CurrentLB.Items.AddObject(CurrentLB.BackUpStrings[i], mpMatchPos); + end;//End if Assigned(mpOrgMatchPos) + Break; + end;//End if (Pos(slPhrases[j], S) <> 0) + end;//End for-loop j + end;//End for-loop i + CurrentLB.Filtered := True; + end;//End if if (slPhrases.Count > 0) + finally + FreeAndNil(slPhrases); + edSearchInList.SetFocus; + if (CurrentLB.Items.Count > 0) then CurrentLB.ItemIndex := 0;//Goto first item + end;//End try-finally + end;//End if Assigned(CurrentLB) +end; + procedure TSearchResultsView.AddMatch(const AIndex: integer; const Filename: string; const FilePosition: TPoint; const TheText: string; @@ -301,6 +509,30 @@ begin end; end; +procedure TSearchResultsView.Parse_Search_Phrases(var slPhrases: TStrings); +var i, iLength: Integer; + sPhrases, sPhrase: string; +begin + //Parse Phrases + sPhrases := edSearchInList.Text; + iLength := Length(sPhrases); + for i:=1 to iLength do + begin + if ((sPhrases[i] = ' ') or (sPhrases[i] = ',') or (i = iLength)) then + begin + if not ((sPhrases[i] = ' ') or (sPhrases[i] = ',')) then + sPhrase := sPhrase + sPhrases[i]; + if (sPhrase > ' ') then + slPhrases.Add(UpperCase(sPhrase));//End of phrase, add to phrase list + sPhrase := '';//Reset sPhrase + end else + begin + if (sPhrases[i] > ' ') then + sPhrase := sPhrase + sPhrases[i]; + end;//End if ((sPhrases[i] = ' ') or (sPhrases[i] = ',')) + end;//End for-loop i +end; + {Brings the results tab named APageName to front. If APageName does not exist, does nothing} procedure TSearchResultsView.BringResultsToFront(const APageName: string); @@ -476,6 +708,7 @@ begin end; NewListBox.Skipped:=0; Result:= ResultsNoteBook.PageIndex; + edSearchInList.Clear; end;//if end;//AddResult @@ -731,24 +964,26 @@ begin fUpdating:= false; fUpdateCount:= 0; fUpdateStrings:= TStringList.Create; + fBackUpStrings := TStringList.Create; + FSearchInListPhrases := ''; + fFiltered := False; end;//Create Destructor TLazSearchResultLB.Destroy; -var - i: integer; begin if Assigned(fSearchObject) then FreeAndNil(fSearchObject); if Assigned(fUpdateStrings) then begin - for i:= 0 to fUpdateStrings.Count -1 do - begin - if Assigned(fUpdateStrings.Objects[i]) then - fUpdateStrings.Objects[i].free; - end;//for + FreeObjects(fUpdateStrings); FreeAndNil(fUpdateStrings); end;//if - + if Assigned(fBackUpStrings) then + begin + FreeObjects(fBackUpStrings); + FreeAndNil(fBackUpStrings); + end;//End if Assigned(fBackUpStrings) + FreeObjects(Items); inherited Destroy; end;//Destroy @@ -847,6 +1082,17 @@ begin end; end; +procedure TLazSearchResultLB.FreeObjects(var slItems: TStrings); +var i: Integer; +begin + if (slItems.Count <= 0) then Exit; + for i:=0 to slItems.Count-1 do + begin + if Assigned(slItems.Objects[i]) then + slItems.Objects[i].Free; + end;//End for-loop +end; + initialization {$I searchresultview.lrs}