PDA

View Full Version : Wrap Panel



Daniels
15 Mar 2010, 4:29 AM
I have a child of Ext.Container. This child is added to a other container. How I can wrap this child in other Ext.Container? I thought in create a new Ext.Panel, add him on the child container and add the child on this new Ext.Panel, but i have no idea how i do this. Anyone have some good idea for do it?

Daniels
15 Mar 2010, 7:01 AM
Any idea? I've looked at the documentation, but I don't found a wrap function =(

Zdeno
15 Mar 2010, 7:09 AM
What layout are you using in containers? Can you post any code?

Daniels
15 Mar 2010, 8:21 AM
I want to create a plugin. So I set something like this:


new Ext.Panel({
plugins:[myPlugin]
});

on this plugin, i receive the Ext.Panel:



myPlugin = {
init : function(comp) {
if(!comp instanceof Ext.Container) {
throw "comp must be a Ext.Container";
}
comp.on('afterrender', function() {
//wrap comp here.
});
}
}


I don't know how to wrap comp. I tried to add comp on other Ext.Panel and put this new Panel on the comp locale, but it doesn't work.