Page 1 of 1

Set item as first visible

Posted: Mon Dec 21, 2015 9:40 am
by Jim Knopf
Hi,

is there an easyer solution to set a specific item as the first visible then a loop with FirstVisible and VScroll?

Some items of a longer file have anchors. If user selects a number, this item is to be on top of the current window, is to be the first visible item. As clicking on a page anchor in browser.

thanks
Martin

Posted: Mon Dec 21, 2015 11:52 am
by Sergey Tkachenko
Sorry, I do not completely understand the question.

Do you want to scroll so that the specific item is shown at the top?

If the item is in the root document (not in a table cell), then

Code: Select all

rv.GetItemCoords(ItemNo, X, Y);
rv.ScrollTo(Y);

Posted: Mon Dec 21, 2015 12:09 pm
by Jim Knopf
Oh, so simple!
I knew that there would exist a more simple solution :-)

Thank you!