CPB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Locating text cursor
I ´m trying to write a application that find text in a TRichEdit but I
have a problem:
With the FindText method of TRicheEdit I know the position of the
specific string but, how could I locate the text cursor on a
defined position inside the TRicheEdit and select the found string?
void __fastcall TForm1::FindDialog1Find(TObject *Sender)
{
AnsiString text;
int length;
int pos;
text=FindDialog1->FindText;
RichEdit1->SelectAll();
length=RichEdit1->SelLength;
TSearchTypes options;
options<<stWholeWord;
pos=RichEdit1->FindText(text,0,length,options);
........
........
........
........
........
FindDialog1->CloseDialog();
}
Please answer me with a example
Regards...
W Komornicki's Home Page |
Main Index |
Thread Index