On Tue, 26 Nov 2013 09:18:03 +0200 Chavoux Luyt <[email protected]> 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 -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
