Hi All,
how can i add the "scroll" event in Panel Component?
I try to add it in initComponent but there isn't object on which link the event...i write this code
Code:
Ext.override(Ext.panel.Panel, {
initComponent: function() {
var me = this;
me.addEvents(
'beforeclose',
'close',
"beforeexpand",
"beforecollapse",
"expand",
"collapse",
'titlechange',
'iconchange',
'iconclschange',
'scroll'
);
try{
me.el.on("scroll", this.onScroll, this);
} catch(e){}
if (me.collapsible) {
// Save state on these two events.
this.addStateEvents(['expand', 'collapse']);
}
if (me.unstyled) {
me.setUI('plain');
}
if (me.frame) {
me.setUI(me.ui + '-framed');
}
// Backwards compatibility
me.bridgeToolbars();
me.callParent();
me.collapseDirection = me.collapseDirection || me.headerPosition || Ext.Component.DIRECTION_TOP;
// Used to track hidden content elements during collapsed state
me.hiddenOnCollapse = new Ext.dom.CompositeElement();
},
onScroll : function(event){
....
}
});
but i receved error in
Code:
try{
me.el.on("scroll", this.onScroll, this);
} catch(e){}
becouse me.el is undefined.
Where am I wrong?
Thanks in advance for your help