首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

更换Ext.viewport各个方位下的显示内容

2012-10-24 
更换Ext.viewport各个方位上的显示内容更换Ext.viewport各个方位上的显示内容定义replace方法var replace

更换Ext.viewport各个方位上的显示内容

更换Ext.viewport各个方位上的显示内容

定义replace方法

    var replace = function(id, config){    var comp = Ext.getCmp(id);    comp.remove(0);    comp.add(config);    comp.doLayout();    }

?方法说明:id是viewport各方位的id,config是即将显示在viewport上的内容

?

?在viewport的center方位更换一个EditorGrid

handler:function(){       editGrid = newBankCxGrid();       replace('cmp_center',editGrid);}

?在方法newBankCxGrid创建并返回editGrid。

热点排行