日期:2014-05-16  浏览次数:20796 次

关于extjs中,panel嵌套的问题 - Web 开发 / Ajax
使用panel的boder布局,第一次加载的时候就只能显示出title,嵌套的其它pannel加不进去,框架都不显示,再加载一次就正常了,郁闷中,还需要设置什么属性吗?
JScript code

Ext.namespace('DF.tjxs');

/**
 * 配电设备
 * 
 */
DF.tjxs.pwsbPanel = function(config) {
    // 定义成员变量 及方法
            var cb = new Ext.form.ComboBox({
                // all of your config options
//                fieldLabel: '月份',
//
//                listeners:{
//                     scope: this
////                     'select': yourFunction
//                }
            });

           var toolbarPanel = new Ext.Panel({   
                      //  title : '工具栏面板',   
                        region : 'north' ,
             height : 40,
             items :[cb]
                    });   
            var pwsbTreePanel = new Ext.Panel({   
                   //     title : '配网设备列表',   
                        region : 'west' , 
                        width : 200,   
                        minSize : 100,   
                        maxSize : 300 
                    });   
            var pwsbEditPanel = new Ext.Panel({   
                  //      title : '编辑功能面板',   
                        region : 'center', 
                        height : 100   
                    });  

            var innerPanel = new Ext.Panel({   
                        title : '配网设备管理',   
                        region : 'center',   
                        margins : '5 0 0 0',   
                        layout : 'border', 
                        width : 500,
                        height : 600,
                        items : [toolbarPanel,pwsbTreePanel, pwsbEditPanel]
                        
                    });  

    
    // 调用构造函数
               
    DF.tjxs.pwsbPanel.superclass.constructor.call(this, {
                layout: 'border',
                title : '配网设备',
                closable : true,
                scope : this,
                items : [innerPanel]
            });
   Ext.apply(this, config);
};

Ext.extend(DF.tjxs.pwsbPanel, Ext.Panel, {

});





------解决方案--------------------
学习一下
------解决方案--------------------
doLayout()试试