PDA

View Full Version : resizeable element - css?



humpdi
8 Mar 2007, 5:40 AM
hey guys!

ive added a Ext.Resizeable to a textarea, now its resizeable, but i dont see the blue handler that shows that its resizeable. have it some thing todo with css?


var resizableElements = {
init : function(){

var resize_nsr_studyaim = new Ext.Resizable('nsr_studyaim', {
wrap:true,
pinned:true,
width:450,
height:150,
minWidth:200,
minHeight: 50,
dynamic: true,
handles: 's'
});
}
};


<textarea name='nsr_studyaim' id='nsr_studyaim' cols='' rows=''></textarea>

please help me, thanks :)

Animal
8 Mar 2007, 6:09 AM
At what point do you execute resizableElements.init()?

humpdi
8 Mar 2007, 8:15 AM
i excecute it at the end of the .js file where this function is in, nearly under the function. that means, BEFORE the markup of the textarea is loaded. is this a problem??

Animal
8 Mar 2007, 8:23 AM
Of course :!:

tryanDLS
8 Mar 2007, 10:32 AM
Maybe I'm missing something, but how can you expect to operate on a DOM object if the object hasn't been loaded into the DOM yet?

Tornado
8 Mar 2007, 11:58 PM
Use something like this:


Ext.onReady(resizableElements.init, resizableElements);

humpdi
9 Mar 2007, 3:46 AM
var initALL = {
init : function(){
resizableElements.init();
}
}
Ext.EventManager.onDocumentReady(initALL.init, initALL, true);

i do something like this.. that should mean that the resizeable element is then init when the document is completely loaded.. or did i see something wrong?

the resize does works, only the blue panel at the south doesnt appear that shows the user that he can resize that element

Animal
9 Mar 2007, 5:36 AM
That should work.

Just check that you have included ext-all.css in your page (Check with Firebug that it's finding it)

humpdi
9 Mar 2007, 6:35 AM
yeah its there... i have a resizeable grid too, and there was the handler shown.. dont know where the failure could be.. hm

ive to play around with that later, should not hold me now

thank ya all for ya help