View Full Version : Override Onscroll

26 Nov 2010, 2:23 PM
I have a panel with scrolling enabled. I would like to override the scroll function and put a delay there so it doesnt conflict with my pinch event.

How can I override it?

MyPanel = Ext.extend(Ext.Panel, {
onScroll: function() {
// Does Not Work

Steffen Hiller
27 Nov 2010, 7:46 AM
The Ext.Panel doesn't have a onScroll method, so it's never called if you define it like that.

You either need to set your own listener on the panel's scroller object,
or you check again in the source of Ext.util.ScrollView and Ext.util.Scroller if that what you want to achieve can really be done by messing with the scroll event or overriding Ext.util.ScrollView's onScroll method.