Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2013-11

TFindDialog

3 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Chavoux Luyt

Hi everybody

I think I am missing something, but reading through the TFindDialog help file I still cannot figure it out: How do I specify which text (or component) must be searched?

What I actually want to do, is to search through all files in a directory for a specific string (the one in FindDialog.FindText) (The current open file is in a TlpHtmlPanel).

Currently I am calling a TAsyncProcess in order to open a console and run grep from the commandline, but there must be a better way? Even if I have to open all the files one by one in an invisible TMemo to search through each one. Or is there a way to pipe the output of a TAsyncProcess (grep) back into a TMemo?

Cheers
Chavoux

Mattias Gaertner
to Chavoux Luyt
Show quoted text 5 lines
Hi everybody I think I am missing something, but reading through the TFindDialog help file I still cannot figure it out: How do I specify which text (or component) must be searched?

I'm not sure, if you understand what TFindDialog is. It is only a dialog. It has no search capabilities.

Show quoted text 9 lines
What I actually want to do, is to search through all files in a directory for a specific string (the one in FindDialog.FindText) (The current open file is in a TlpHtmlPanel). Currently I am calling a TAsyncProcess in order to open a console and run grep from the commandline, but there must be a better way? Even if I have to open all the files one by one in an invisible TMemo to search through each one. Or is there a way to pipe the output of a TAsyncProcess (grep) back into a TMemo?

Using grep for search might be ok.
A TMemo is a visible control and almost always slower than a TTextStrings, TStringList, TSynEditLines or TCodeBuffer.

There are several ways to find the target files.
And there several ways to search a text in a file.

What exactly do you want to do?

Mattias