Page 1 of 1
How to select text inview
Posted: Tue Oct 06, 2020 7:39 pm
by jgkoehn
Greetings,
Is there a way to select the text that is in view to work through?
Re: How to select text inview
Posted: Wed Oct 07, 2020 12:16 pm
by Sergey Tkachenko
Do you want to select all text?
Or do you want to select visible text? If yes, do you want to select lines that are visible only partially?
Re: How to select text inview
Posted: Wed Oct 07, 2020 1:04 pm
by jgkoehn
Greetings Sergey,
Only visible (I select all from time to time but would like to work with visible) partially visible not as important.
Basically would like the user to be able to scroll and certain text would be marked and as it scrolls off screen it is unmarked unlesss they have changed it.
Re: How to select text inview
Posted: Wed Oct 07, 2020 4:36 pm
by Sergey Tkachenko
Code: Select all
var
ItemNo1, ItemNo2: Integer;
ItemNo1 := rve.GetFirstItemVisible;
ItemNo2 := rve.GetLastItemVisible;
if ItemNo1 >= 0 then
rve.SetSelectionBounds(ItemNo1, rve.GetOffsBeforeItem(ItemNo1),
ItemNo2, rve.GetOffsAfterItem(ItemNo2));
Re: How to select text inview
Posted: Wed Oct 07, 2020 5:04 pm
by jgkoehn
Thanks Sergey, Perfect, I knew it must be simple.
A small addition I think
does it require RVDATA?
Re: How to select text inview
Posted: Wed Oct 07, 2020 6:41 pm
by jgkoehn
If I wanted to make it more precise to just the item content in view? Would it be much more?