View Full Version : scrollTo in Ext.ContentPanel or Ext.BorderLayout

9 Aug 2007, 5:07 AM
how can i call scrollTo function to scroll the content in Ext.ContentPanel or Ext.BorderLayout

i have tried the following but with no luck

var scroll_to_album = document.getElementById('container_mediagallery_album_'+node.id);
var myEl = Ext.get(scroll_to_album);
myEl.scrollTo('Top', 10, true);

Does someone have the same problem too?

9 Aug 2007, 5:26 AM
You are probably asking the wrong element to scroll. The element which needs to scroll is the one which has autoScroll:true in its config.

I use autoScroll:true on my ContentPanels, so

myContentPanel.getEl().scrollTo("top", 10);

Scrolls to 10 px from the top.

9 Aug 2007, 5:31 AM
Hello thanks for your help Animal
its working now, i am using the info from this tread