PDA

View Full Version : Ext.Resizable - Howto use the resize event handler?



sh_rox
26 Nov 2007, 3:31 AM
Hi,

Iam getting weird on using the public event handler resize of an Ext.Resizeable. Could anybody told me howto use this handler?
I've tried somthing like this:



var snap = new Ext.Resizable('snap', {
pinned: false,
handles: 'all',
width: WIDTH/CELLS,
height: HEIGHT/CELLS,
widthIncrement: WIDTH/CELLS,
heightIncrement: HEIGHT/CELLS,
maxWidth: WIDTH,
maxHeight: HEIGHT,
minWidth: WIDTH/CELLS,
minHeight: HEIGHT/CELLS,
transparent:true,
dynamic: true
});

snap.on('resize', function() {
alert('New Width: ' + this.width );
});
this fires on resize, thats what I want. But I want also know the new width and height of the resizable. I think I overide the original eventhandler 'resize' with this, but didn't know how I write the right syntax for 'resize'-handler. Hmmm ...

I hope anyone could help
thx rox

efege
26 Nov 2007, 4:03 AM
Please check the API docs for Ext.Resizable, or check the lines with [B]

sh_rox
26 Nov 2007, 4:09 AM
Hi,
it works fine, thx @efege :-)