I'm trying to implement search functionality in a TRichViewEdit in Delphi7. The control is IMemo and contains mixed ANSI and Unicode.
I'm calling the function
if ((MatchCase = 0) and (WholeWord = 0)) then
Found := IMemo.SearchText(EFind.Text,[])
But it does not find words that ARE in the control. In tracing the code in the RVSource code, the function exits at
if Items.Objects[strt]=item then begin
if Down then
inc(strt)
else
dec(strt);
if (strt>=Items.Count) or (strt<0) then exit;
with strt = -1. I.e. it never gets to start the search. Items.Count = 20 when the function starts. The search string, EFind.Text is 'generate'.
What am I missing here?
TIA,
Dick Bryant
Open Window Software
SearchText problem in RichViewEdit
-
- Posts: 148
- Joined: Wed Dec 07, 2005 2:02 pm
- Contact: