When the scrolling is enabled on a component in Sencha Touch, the framework fires the scroll related events that we use to scroll the content. This recipe lists out the scroll related events and shows how to handle them.
Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.
Carry out the following steps:
Add the following handler functions inside the
Ext.onReady
inch09_01.js
:this.handleScrollEvent = function(e) { console.log('scroll'); } this.handleScrollstartEvent = function(e) { console.log('scrollstart'); } this.handleScrollendEvent = function(e) { console.log('scrollend'); }
Set
scroll: 'vertical'
property to the panel initialization:var pnl = new Ext.Panel({ id:'main-panel', fullscreen: true, scroll: 'vertical', monitorOrientation: true,
Add the following code after the component reference is retrieved using the
Ext...