In my application i have many windows and panels and im using custom scrollbars. So for each window or panel i need to specify afterlayout listener to get the custom scroll bar
listeners:{
afterlayout: function(c){
fleXenv.fleXcrollMain(c.body.id);
}
}
So what im looking for is i need to add this listener globally for windows and panels so that by adding this code one time should effect on all windows or panels.
Is there any way to do this
It seems that your custom scrollbar is used in all Windows and Panels of your application. Hence there is nothing wrong with extending the core ExtJs classes IMHO.
Implement it as a ‘feature’ that is enabled by default but – for the rare cases where you don’t want the scrollbar – can be disabled.
Load with
Ext.require('patch.Ext.panel.Panel-scrollbar')or add it as dependency (requires) to your application definition.Ext.window.Windowextends fromExt.panel.Panel, hence it will inherit the behavior.