Board index » cppbuilder » Several "search & replace" actions in TRichEdit at once - performance problem...?
Oren (Halvani.de)
CBuilder Developer |
Several "search & replace" actions in TRichEdit at once - performance problem...?2003-08-01 05:24:16 AM cppbuilder47 hi dear builders, I'm using several "search & replace" actions in a TRichEdit at once with the following code.. My program is not responding when I use 25 of these actions on a text capacity of about 2 mbyte... well after 20 minutes its returns back to life :-) So, my question now...is there a better way doing several actions at once ? Threads maybe ?? If yes, how can I handle it with a Therad ?? Hope someone have a little hint on this.. Oren /*************************************************************/ void __fastcall TfrmStringReplacement::cmdStartClick(TObject *Sender) { //... AnsiString SearchString = txtSearch->Text; AnsiString ReplaceString = txtReplace->Text; RichEdit1->Lines->Text = StringReplace(RichEdit1->Lines->Text, SearchString, ReplaceString, TReplaceFlags() << rfReplaceAll); //.... } /*************************************************************/ |