Ankit.Desai
16 Aug 2011, 12:57 PM
Hello, I am trying to add Ext.window as a child of an Ext.panel. I tried different way like, in show method of window I passed panel id
}).show('pan1') or get panel component and add window in side it
Ext.getCmp('pan1').on('load',function(){ win1.show('siteSearchOption');
});
none of them worked. My aim is to add window in side a panel as child like we do with other component as xtype:'panel'.
Please find below full code of the page I am working on. This will display both the window and parent panel but window displayed as independent component so, it is rendering anywhere on the page. I want to restrict its movement only in to parent panel.
Ext.onReady(function(){
Ext.create('Ext.panel.Panel', {
renderTo: Ext.getBody(),
width: '100%',
height: 800,
title: 'Site Register',
layout: 'column',
items: [
{
xtype: 'panel',
id:'pan1',
title: 'siteSearchPanel',
height: 700,
width: '55%',
items:[new Ext.window.Window({
title: 'Search Options',
id: 'win',
height: 200,
width: 650,
layout: 'fit',
collapsible: true,
items: [{
xtype: 'panel',
height: 100,
width: 650,
contentEl:'siteSearchOption'
}]
}).show()]
},
{
xtype: 'tabpanel',
title: 'Site Information',
height: 700,
width: '45%',
items:[{
//contentEl:'siteTabContentsDiv',
title:'Site'
},{
title: 'Pressure',
html: 'PRESSURE STUFF GOES HERE'
},{
title: 'Cluster',
html: 'CLUSTER STUFF GOES HERE'
}]
}
]
});
});
Hope to see some reply.
-Ankit
}).show('pan1') or get panel component and add window in side it
Ext.getCmp('pan1').on('load',function(){ win1.show('siteSearchOption');
});
none of them worked. My aim is to add window in side a panel as child like we do with other component as xtype:'panel'.
Please find below full code of the page I am working on. This will display both the window and parent panel but window displayed as independent component so, it is rendering anywhere on the page. I want to restrict its movement only in to parent panel.
Ext.onReady(function(){
Ext.create('Ext.panel.Panel', {
renderTo: Ext.getBody(),
width: '100%',
height: 800,
title: 'Site Register',
layout: 'column',
items: [
{
xtype: 'panel',
id:'pan1',
title: 'siteSearchPanel',
height: 700,
width: '55%',
items:[new Ext.window.Window({
title: 'Search Options',
id: 'win',
height: 200,
width: 650,
layout: 'fit',
collapsible: true,
items: [{
xtype: 'panel',
height: 100,
width: 650,
contentEl:'siteSearchOption'
}]
}).show()]
},
{
xtype: 'tabpanel',
title: 'Site Information',
height: 700,
width: '45%',
items:[{
//contentEl:'siteTabContentsDiv',
title:'Site'
},{
title: 'Pressure',
html: 'PRESSURE STUFF GOES HERE'
},{
title: 'Cluster',
html: 'CLUSTER STUFF GOES HERE'
}]
}
]
});
});
Hope to see some reply.
-Ankit