PDA

View Full Version : Border Layout Weight configuration



FCTim
28 Dec 2011, 8:46 AM
In the PR1 blog entry, Don mentioned this:


You could not configure the layout such that an east or west region had priority over a north or south region. To achieve this, again, you needed to use nested border layouts.


Does this mean that we can now have a layout like this without using nested border layouts:


[ | | ]
[ | | ]
[ East | Center | West ]
[ |---------| ]
[ | South | ]


I.E where the East and West regions overlay the south region? If so, how do we go about configuring it that way? I tried to take a look at the source changes but couldn't quite grasp it.

Thanks,
Tim

mitchellsimoens
28 Dec 2011, 9:45 AM
Check this out:


Ext.create('Ext.panel.Panel', {
renderTo : Ext.getBody(),
width : 400,
height : 400,
layout : 'border',
items : [
{
title : 'West',
region : 'west',
width : 100,
weight : -1
},
{
title : 'East',
region : 'east',
width : 100,
weight : -1
},
{
title : 'South',
region : 'south',
height : 100,
weight : -2
},
{
title : 'Center',
region : 'center'
}
]
});

FCTim
28 Dec 2011, 11:54 AM
Sweet, thanks!