PDA

View Full Version : Remembering scroll position in BorderLayout...



23 Apr 2007, 6:24 AM
I am wondering if there is a way for the BorderLayout to remember it's scroll position on a postback? I tried setting the focus of a control in the hopes that would autoscroll me to a position near where I was before the postback and that does set the focus of an element (a button in my case) but it does not scroll the BorderLayout back to a desirable position. Ideally I'd like something to work like SmartNavigation used to.

Thanks!
Steve

24 Apr 2007, 4:22 AM
Surely there has to be a way of performing this task easily...Isn't this a rather common situation I'm asking about?

Thanks!
Steve

prophet
24 Apr 2007, 5:47 AM
Perhaps you could do:

contentPanel.on('activate', function() {
Ext.Element.scrollTo('top', 0, false);
});

24 Apr 2007, 1:27 PM
I'm not sure I understand how to use that. I tried adding that code in the location where I am creating the content panel and it doesn't seem to call into that function...