Page 1 of 1

SearchTextW & GetSelectionBounds

Posted: Tue Mar 30, 2021 9:42 pm
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 ?

Re: SearchTextW & GetSelectionBounds

Posted: Tue Mar 30, 2021 10:14 pm
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; ?

Re: SearchTextW & GetSelectionBounds

Posted: Tue Mar 30, 2021 11:05 pm
by jgkoehn
I got this one figured out thanks to your past help.

Re: SearchTextW & GetSelectionBounds

Posted: Wed Mar 31, 2021 5:34 am
by Sergey Tkachenko
Use the functions from RVLinear.pas: RVGetSelection and RVSetSelection.
They can store and restore selection in table cells.