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?
Cheers
Jim
List Positioning
-
- Posts: 24
- Joined: Wed Apr 26, 2017 7:12 pm
Re: List Positioning
Have you looked at the EnsureVisible property?
https://docs.lansa.com/14/en/lansa016/prim_tvit.htm
Turning it on for the first item in your treelist should do the trick I think.
https://docs.lansa.com/14/en/lansa016/prim_tvit.htm
Turning it on for the first item in your treelist should do the trick I think.
Re: List Positioning
I'll give that a go. Thanks!
Re: List Positioning
soa,
I use the following method:
Mthroutine Name(ScrollToTop)
#Tree.VerticalScrollTo( #Tree.Items<1>.Design Top)
Endroutine
The trick is that the 'control' is actually the design of the item.
Brendan.
I use the following method:
Mthroutine Name(ScrollToTop)
#Tree.VerticalScrollTo( #Tree.Items<1>.Design Top)
Endroutine
The trick is that the 'control' is actually the design of the item.
Brendan.