I am using a TAdvMemo/TScrMemo in a form in C++ Builer 10.3. I am simply tring to implement the search/findtext method of the TAdvMemo/TScrMemo. But, I am getting the following error :
[bcc32 error] Unit2.cpp (159): E2285 No match found for
'TScrCustomMemo :: FindTextInMemo (UnicodeString, TFindOptionEx)'
I have a TAdvMemo/TScrMemo (Scripter), TButton, TEdit (for search)
void __fastcall TForm2::BtnSearchClick(TObject *Sender)
{
String FSearch = EdtSearch->Text;
Scripter->FindTextInMemo(FSearch,frDown);
}
What am I doing wrong here?
Function signatures:
int __fastcall FindTextInMemo(System::UnicodeString SearchStr, Vcl::Dialogs::TFindOptions Options)/* overload */;
int __fastcall FindTextInMemo(System::UnicodeString SearchStr, TFindOptionsEx Options)/* overload */;
ANSWER:
Got it compile without error with the following code:
void __fastcall TForm2::BtnSearchClick(TObject *Sender)
{
String FSearch = EdtSearch->Text;
TFindOptions fn;
fn = TFindOptions() << frDown;
Scripter->FindTextInMemo(FSearch,fn);
}
Looks like the frDown
component is from a Delphi set and I have to do like above to use it in C++.