SearchTextW & GetSelectionBounds

General TRichView support forum. Please post your questions here
Post Reply
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

SearchTextW & GetSelectionBounds

Post by jgkoehn »

I use RichViewEditClean.SearchTextW('<bkm>', [rvseoMatchCase, rvseoDown, rvseoMultiItem]) = False
to locate tags (there are different variations, but we will use <bkm> for now.)
once that tag is found I use
RichViewEditClean.GetSelectionBounds(rsiNo, rsiOffs, reiNo, reiOffs, TRUE);
to store its location.

All of this works quite well until. A tag is found in a table. (SearchTextW works well with the table.)

How can I store its location so I can retrieve it to work with it?
Is it how I am using GetSelectionBounds ?
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Re: SearchTextW & GetSelectionBounds

Post by jgkoehn »

I see I forgot TopLevelEditor is there a way to make it be that for a function? Without adding a bunch?
like
RichViewEdit := RichViewEdit.TopLevelEditor; ?
jgkoehn
Posts: 303
Joined: Thu Feb 20, 2020 9:32 pm

Re: SearchTextW & GetSelectionBounds

Post by jgkoehn »

I got this one figured out thanks to your past help.
Sergey Tkachenko
Site Admin
Posts: 17569
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: SearchTextW & GetSelectionBounds

Post by Sergey Tkachenko »

Use the functions from RVLinear.pas: RVGetSelection and RVSetSelection.
They can store and restore selection in table cells.
Post Reply