View Full Version : Ext.Panel - resize and bodyresize events never fire

Ion Tichy
24 Jan 2011, 7:19 AM

I'm trying to react to resize/bodyresize events in an Ext.Panel. My code looks something like this:

Ext.setup( {
onReady: function ()
var container = new Ext.Panel( {
fullscreen: true,
layout: 'fit',
padding: '20px',
style: 'background-color:Green',
items : [
new Ext.Panel({
style: 'background-color:LightBlue',
html: "<h1>Bite me!</h1>",
listeners: {
resize: function( component, adjWidth, adjHeight, rawWidth, rawHeight ) { console.log("resized!"); },
bodyresize : function( component, width, height ) { console.log("bodyresize!"); },
render: function( component ) { console.log("rendering!"); }

The render event is called. The resize and bodyresize events are NEVER called. What am I overlooking here?

Ion Tichy
25 Jan 2011, 3:21 PM
I found some workaround, using a resize event on the body. But this seems dirty. Any idea why the events I'm targeting don't fire?

Ion Tichy
27 Jan 2011, 8:10 AM

5 Apr 2011, 7:23 AM
I would like to know the answer too


Ion Tichy
5 Apr 2011, 7:31 AM
it's been a while, but I believe the problem was, that the event was fired on the container, but not the panel inside, because the container is in charge of the layout based on the layout-policy set on it.

5 Apr 2011, 7:34 AM

Does that mean that you can only fire the body event?

I dont believe there is an after resize tag