PDA

View Full Version : window



genius551v
6 Oct 2009, 7:29 PM
hey guys i need a little help.

i need show a window (simple) in the center region, with expand and limit in the region (center)

just like i try show in my example (just a draw)

tnks for your help

i have this:



Ext.onReady(function(){
Ext.QuickTips.init();

var mainMenuToolbar = new Ext.Toolbar({renderTo: 'mainMenuToolbar'});
Toolbar.create(mainMenuToolbar);

var mainHeaderPanel = new Ext.Panel({
border: false,
layout: 'anchor',
region: 'north',
height: 83,
items: [
{
xtype: 'box',
el: 'header',
border: false,
anchor: 'none'
},
mainMenuToolbar
]
});

var mainCenterPanel = {
id: 'center-panel',
region: 'center',
layout: 'fit',
margins: '3 3 3 3' //U R D L
};

var viewport = new Ext.Viewport({
layout:'border',
items:[ mainHeaderPanel, mainCenterPanel ]
});

viewport.doLayout();

Ext.get('loading-mask').remove();
Ext.get('loading').remove();
});

aconran
6 Oct 2009, 7:37 PM
When creating the Ext.Window specify the renderTo configuration to the panel's body element which is in the center region.

Animal
6 Oct 2009, 9:26 PM
With this FR, you'd just be able to use a Window as one of the child items: http://www.extjs.com/forum/showthread.php?t=80943