Page 1 of 1

A problem with RVE.SearchText

Posted: Thu Apr 13, 2006 6:25 am
by IGDark
Hello,

I have a question - is there any way to search a text in TRichViewEdit from one position to another using SearchText. For example I need to find a specific text from one position in the component to another (to the end). What I mean is that I don't want RVE to search text cyclically. I want it to stop at the end. For example I have a block of text

Test1
Test2
Test1
Test3 <<---- starting position
Test1

I identify the starting position using SetSelectionBounds. And now I want to find "Test1" from this position up to the end. If I write

while CWnd.SearchText('Test1', [rvseoDown]) = true do
...

Then the component will find 3 occurrencies, but I need just one...


I would really appreciate your help!
Alex.[/img]

Posted: Thu Apr 13, 2006 6:56 pm
by Sergey Tkachenko
Currently, it's not possible to define where the search should stop.
The only way - checking if the found word is beyond the limit.