-
19 Jul 2012 7:07 AM #1
Answered: scroll a panel horizontaly
Answered: scroll a panel horizontaly
Hi

i have a panel
var scrollItem = Ext.create("Ext.Panel", {
height:74,width:230,scrollable:{direction:'horizontal',directionLock:true},
html:GetScrollItemHtml()
});
is there a way to use ,scrollItem.scrollTo(0,30px) ?
in docs there is scrollTo in Ext.Scroll.Scroller,
but container.getScrollable() but it returns scroll.view which has scroll to
so i want to scroll my panel automatically , any help
? thx 
-
Best Answer Posted by grgur
You have to access Ext.scroll.Scroller and use the scrollTo method from there
e.g.
Code:var scroller = panel.getScrollable().getScroller(); scroller.scrollTo(200, null, true);
-
19 Jul 2012 7:30 AM #2Sencha - Community Support Team
- Join Date
- Aug 2007
- Location
- Split, Croatia
- Posts
- 133
- Vote Rating
- 14
- Answers
- 9
You have to access Ext.scroll.Scroller and use the scrollTo method from there
e.g.
Code:var scroller = panel.getScrollable().getScroller(); scroller.scrollTo(200, null, true);
Grgur Grisogono
Ext JS in Action SE co-author
Exercising awesomeness at Modus Create - Official Sencha Partner
Get in touch for Sencha Touch Training
@ggrgur
-
19 Jul 2012 7:50 AM #3


Reply With Quote

it did work