PDA

View Full Version : Changing config options



geo_cris_ro
14 Apr 2009, 1:49 AM
Hello!

I stumbled into a little problem.

For example, after I create a resizable element, I want to set the
draggable to "true".
I've been searching for this for a few hours, but I can't find anything helpfull.
Can anyone give me a tip?


var edit = new Ext.Resizable('editor_box', {
draggable:false,
transparent:true,
dynamic:true
});

Condor
14 Apr 2009, 2:14 AM
Try:

var edit = new Ext.Resizable('editor_box', {
draggable:true,
transparent:true,
dynamic:true
});
edit.dd.lock();
and call:

edit.dd.unlock();
when you want to enable dragging.

14 Apr 2009, 2:22 AM
Code:

http://jsbin.com/oyuro/edit

Working:

http://jsbin.com/oyuro/

hth

w://

geo_cris_ro
14 Apr 2009, 4:20 AM
Thanks a lot Condor (https://extjs.com/forum/member.php?u=343) !
It works perfect. Like a charm. So easy to add, too ...

But if I want to do the same thing with the resize option?
I tried to test the example from the api, and hide the handlers(thinking that it will disable resize), but I get this error. Surely I am doing something wrong.

resizer.east.setDisplayed is not a function


var resizer = new Ext.Resizable("element-id", {
handles: 'all',
minWidth: 200,
minHeight: 100,
maxWidth: 500,
maxHeight: 400,
pinned: true
});
resizer.east.setDisplayed(false);

14 Apr 2009, 5:30 AM
Try this:

code:

http://jsbin.com/obosu/edit

working:


http://jsbin.com/obosu

geo_cris_ro
14 Apr 2009, 7:12 AM
Thanks a lot man! That was it. one line of code.


extId.enabled = true;


Where in the api can I find this? I searched a lot ... and nothing ...

I feel kind of stupid :-/

Thank you very much!!!