ann0yanc3
7 Mar 2007, 2:08 PM
I have a simple layout define as follows...
layout = new Ext.BorderLayout(Ext.get("testcon"), {
north: {
titlebar: false
},
west: {
initialSize: 200,
titlebar: true,
},
south: {
titlebar: false
},
center: {
titlebar: true
}
});
layout.beginUpdate();
layout.add('north', new Ext.ContentPanel('north', 'North'));
layout.add('south', new Ext.ContentPanel('south', 'South'));
layout.add('west', new Ext.ContentPanel('west', {title: 'Navigation'}));
layout.add('center', new Ext.ContentPanel('center', {title: 'Content'}));
layout.endUpdate();
The "testcon" DIV has the following CSS...
#testcon{
width:760px;
position:relative;
margin:20px auto;
}
The layout is completely messed up, and only displays 'north' properly. Setting the height property fixes the problem, of course. However, why can't the 'center' region auto-adjust its height with the height of its content? (no scrolling) I don't see why a height property is needed for the layout to display properly. Is there a work-around? Am I missing a property, or method within LayoutRegion, or ContentPanel?
Thanks.
layout = new Ext.BorderLayout(Ext.get("testcon"), {
north: {
titlebar: false
},
west: {
initialSize: 200,
titlebar: true,
},
south: {
titlebar: false
},
center: {
titlebar: true
}
});
layout.beginUpdate();
layout.add('north', new Ext.ContentPanel('north', 'North'));
layout.add('south', new Ext.ContentPanel('south', 'South'));
layout.add('west', new Ext.ContentPanel('west', {title: 'Navigation'}));
layout.add('center', new Ext.ContentPanel('center', {title: 'Content'}));
layout.endUpdate();
The "testcon" DIV has the following CSS...
#testcon{
width:760px;
position:relative;
margin:20px auto;
}
The layout is completely messed up, and only displays 'north' properly. Setting the height property fixes the problem, of course. However, why can't the 'center' region auto-adjust its height with the height of its content? (no scrolling) I don't see why a height property is needed for the layout to display properly. Is there a work-around? Am I missing a property, or method within LayoutRegion, or ContentPanel?
Thanks.