selecting text in document by text offsets

General TRichView support forum. Please post your questions here
Post Reply
jimbr32
Posts: 20
Joined: Thu Nov 09, 2006 10:01 pm

selecting text in document by text offsets

Post by jimbr32 »

I need to extract all the text from a document, do some processing, and be able to select text in the document based on offsets in the extracted text.

For example, I'd like to do something like call RVGetText.GetAllText, call RVLinear.RVSetSelection using offsets from the text, and apply font styles to the selected text. Text offsets don't match up when I try this.

Processing individual text items may work better, but my text processing needs to see the entire document. Is there a way to do it?

Thanks
Jim
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Use RVGetTextRange(rv, 0, RVGetTextLength(rv)) from RVLinear.pas
jimbr32
Posts: 20
Joined: Thu Nov 09, 2006 10:01 pm

Post by jimbr32 »

Thank you. Thats exactly what I was looking for.

Jim
Post Reply