PDA

View Full Version : Ext.Resizable and BoxComponent



uooq
22 Mar 2011, 12:48 PM
I'm trying to write my own component by extending BoxComponent. I'd like to make it resizable, but I haven't had any success using Ext.Resizable except when I use it to retrieve a named div in the html.

Instead, I want to use Ext.Resizable to resize my BoxComponent. The API docs say that Ext.Resizable can take an id OR an element. I've tried using the component itself, or myComponent.getEl() or myComponent.getResizeEl() and I always wind up with an error coming from the Ext.Resizable constructor:

The offending line from ext-all-debug.js looks like this:


this.proxy = this.el.createProxy({tag: 'div', cls: 'x-resizable-proxy', id: this.el.id + '-rzproxy'}, Ext.getBody());

The problem is that this.el is null.

I kind of understand that what's happening is that Ext is trying to wrap a div around the thing it wants to make resizable, but I'm not clear at all on what the right way to achieve this is-- or even if I shouldn't be using Ext.Resizable for this situation...

Any thoughts?