PDA

View Full Version : How to make tab content scroll up ?



EZboy
24 Sep 2009, 12:26 PM
Hey everyone.

So I have a tab with more content that can fit on a page, hence I have vertical scroll bar.
How do I reposition the content to the top (scroll up) when particular event occurs?

I tried :
document.getElementById(tabId).scrollTop = 0;
tab.getLayoutTarget().setPosition(0,0);
tabs.getTabEl(tabId).scrollTop = 0;

these don't work.

Any help appreciated, thanks

jnicora
24 Sep 2009, 1:01 PM
// tab = Ext.Panel reference
tab.body.scrollTo("t", 0, true); // 3rd arg is for animation

EZboy
24 Sep 2009, 1:19 PM
Right on, many thanks !