I have a border layout that has West and Center Regions. There is a Split bar in between the two regions and the center region contains an Ext.GridPanel. When I move the split bar to resize the west region, I want the grid to do a 're-layout' so that it fills up the center region. Right now it wont resize until I resize the entire browser window, only then will the grid fill the center region. Ive tried a few approaches and one that I thought would be the best would be to put a listener on the western panel like so:
{
xtype: 'panel',
region:'west',
split:true,
frame: true,
width: 250,
minSize: 200,
maxSize: 400,
listeners: {
'afterlayout' : function() {
this.on('bodyresize', function() {
Ext.getCmp("resultsGrid").syncSize(); // this doesnt work
});
}
}
}
Anyone know of a way to fill the grid to the center region? I know its possible cause resizing the browser makes it work fine.Give it a layout:
{layout: "fit"}
in its config object and remove the resize listener.haha, that was easy. Dont know why I missed that.
Thanks#If you have any other info about this subject , Please add it free.# |
|
9 January 2009 |
cameltoepants.com |
edit