Find in TDBRICHVIEWEDIT

General TRichView support forum. Please post your questions here
Post Reply
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Find in TDBRICHVIEWEDIT

Post 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.
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Search for a substring? Use SearchText method.
jota
Posts: 48
Joined: Fri Sep 16, 2011 10:56 am

Find in TDBRICHVIEWEDIT

Post 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
Sergey Tkachenko
Site Admin
Posts: 17557
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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)
Post Reply