[Lazarus] TFindDialog
Mattias Gaertner
nc-gaertnma at netcologne.de
Tue Nov 26 17:14:22 CET 2013
On Tue, 26 Nov 2013 09:18:03 +0200
Chavoux Luyt <chavoux at gmail.com> wrote:
> 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.
> 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
More information about the Lazarus
mailing list