PDA

View Full Version : a question about nested layout



vicent
17 Apr 2007, 7:15 PM
layout.beginUpdate();
layout.add('north', new Ext.ContentPanel('north', 'North'));
layout.add('south', new Ext.ContentPanel('south', {title: '操作信息', closable: true}));
layout.add('west', new Ext.ContentPanel('west', { title: '目录',fitToFrame:true}));
layout.add('east', new Ext.ContentPanel('east', {title: '详细信息', closable: true}));
innerLayout.add('center', new Ext.GridPanel(event_grid));
innerLayout.add('center', new Ext.GridPanel(network_grid));
layout.add('center', new Ext.NestedLayoutPanel(innerLayout));
layout.endUpdate();

on the top code , I want to disable( or hide) the "event_grid" when it show "network_grid" , and disable( or hide) the "network_grid" when it show "event_grid" ,how can I do that? thx

vicent
17 Apr 2007, 7:40 PM
innerLayout.getRegion('center').hidePanel('event-grid');
innerLayout.getRegion('center').showPanel('event-grid');