Page 1 of 1

List Positioning

Posted: Fri Jul 06, 2018 2:31 pm
by soa
I have a view which contains a PRIM_TREE<xx>. Each time I show the page I clear and reload the tree. The tree contents is longer than the display area so I can scroll down to see more content. What I find is that if I scroll down the page then move to another view when I display the tree page again it shows the bottom half of the page again as if I had scrolled it even though I've cleared and reloaded it. It seems to remember its previous displayed position. Is there a way to ensure that item 1 in the Tree is always shown first?


Re: List Positioning

Posted: Mon Jul 09, 2018 6:05 pm
by pkoopmanpk
Have you looked at the EnsureVisible property?

Turning it on for the first item in your treelist should do the trick I think.

Re: List Positioning

Posted: Tue Jul 10, 2018 8:28 am
by soa
I'll give that a go. Thanks!

Re: List Positioning

Posted: Tue Jul 10, 2018 8:32 am
by BrendanB

I use the following method:

Mthroutine Name(ScrollToTop)

#Tree.VerticalScrollTo( #Tree.Items<1>.Design Top)


The trick is that the 'control' is actually the design of the item.