PDA

View Full Version : anchor Resizing



shiva-Kumar
11 Feb 2010, 6:45 AM
Hi,
i have anchor resizing problem please advise .

i have grids placed under anchor layout in center region like shown below


{ region: 'center', // a center region is ALWAYS required for border layout
id : 'center',
layout:'anchor',
anchorSize: {width:800, height:600},
border:false,
items:[{
title:'Result Grid',
id: 'pnlResutView',
title: 'Result View',
contentEl:'treegriddata',
collapsible: true

},{
title:'Summary Grid',
id: 'pnlSummaryView',
title: 'Summary View',
contentEl:'summaryGrid',
collapsible: true

}

On load I am hiding the pnlSummaryView and making pnlResultView 100% 100% but now the problem am facing is

On click of button am trying to resize both the grids, like pnlSummaryView to 100% 50% and pnlResultView 100% 50% (width,height) ,shown in the code below is not working .




function getEvent(){
Ext.getCmp("pnlSummaryView").el.show();

Ext.getCmp("pnlSummaryView").anchor="100% 50%";

Ext.getCmp("pnlSummaryView").doLayout();

Ext.getCmp("pnlResutView").anchor="100% 50%";

Ext.getCmp("pnlResutView").doLayout();
}



trying to load the page with both the grids 50% and 50% height which is not happening ,Please advise how to achieve this

Thanks
Shiva