I am trying to display a panel with BorderLayout. The panel displayed is an instance of the Ext.Panel subclass. I had a panel that displayed perfectly before trying to add a layout, but with the added layout it does not appear at all, without throwing any errors and does not provide any useful feedback. Using exactly the same attributes, but not subclasses, the panel also works just fine. To demonstrate, with code directly from the ExtJS BorderLayout API, this works:
var win = new Ext.Panel({
renderTo: document.body,
width: 700,
height: 500,
title: 'Border Layout',
layout: 'border',
items: [{
title: 'South Region is resizable',
region: 'south',
height: 100,
split: true,
minSize: 75,
maxSize: 150,
margins: '0 5 5 5'
},{
title: 'West Region is collapsible',
region:'west',
margins: '5 0 0 5',
width: 200,
collapsible: true,
cmargins: '5 5 0 5',
id: 'west-region-container',
layout: 'fit',
unstyled: true
},{
title: 'Center Region',
region: 'center',
xtype: 'container',
layout: 'fit',
margins: '5 5 0 0'
}]
});
and this is not so:
BasePanel = Ext.extend(Ext.Panel, {
renderTo: document.body,
width: 700,
height: 500,
title: 'Border Layout',
layout: 'border',
items: [{
title: 'South Region is resizable',
region: 'south',
height: 100,
split: true,
minSize: 75,
maxSize: 150,
margins: '0 5 5 5'
},{
title: 'West Region is collapsible',
region:'west',
margins: '5 0 0 5',
width: 200,
collapsible: true,
cmargins: '5 5 0 5',
id: 'west-region-container',
layout: 'fit',
unstyled: true
},{
title: 'Center Region',
region: 'center',
xtype: 'container',
layout: 'fit',
margins: '5 5 0 0'
}]
});
var win = new BasePanel();
Did I miss something obvious here? Thanks for any help.