Page 1 of 1

Find in TDBRICHVIEWEDIT

Posted: Thu Apr 26, 2012 8:41 am
by jota
Hello.

I need to define a search on data in tdbrichviewedit, containing information from a blob field. I want to place cursor in text found.

How can I do?.

Thanks in advance.

Posted: Sat Apr 28, 2012 10:31 am
by Sergey Tkachenko
Search for a substring? Use SearchText method.

Find in TDBRICHVIEWEDIT

Posted: Wed Feb 27, 2013 11:39 am
by jota
Hi

I always do the search from the beginning TDBRichViewEdit text, even if the cursor is in the middle or end of the text

How can I do?

Thank in advance

Posted: Wed Feb 27, 2013 12:45 pm
by Sergey Tkachenko
Store the selection (RVGetSelectionEx from RVLinear.pas), move the caret to the beginning (dbrv.SetSelectionBounds(0, dbrv.GetOffsBeforeItem(0), 0, dbrv.GetOffsBeforeItem(0)), search. If not found, restore the original selection (RVSetSelectionEx).
You can also store and restore scrolling position (VScrollPos)