EXTJS 4.2 资料 控件之tabpanel 静态生成tabpanel

//**************页面主体开始*****************

    var tabpanel = Ext.createWidget('tabpanel', {

        activeTab: 0,                       //指定默认的活动tab

        height: '100%',

        width: '100%',

        minTabWidth: 115,

        tabWidth: 135,

        plain: true,                        //True表示tab候选栏上没有背景图片(默认为false)

        enableTabScroll: true,              //选项卡过多时,允许滚动

        defaults: { autoScroll: true },

        items: [{

            id: "tab1",

            title: '资讯',

            icon: '/Resources/Images/16x16_Classic/3_16.png',

            layout: 'fit',//填充页面

            items: gridModuleMapping,

            closable: false                  //这个tab可以被关闭

        }, {

            id: "tab2",

            title: '交流',

            icon: '/Resources/Images/16x16_Classic/4_16.png',

            html: "此功能暂时没开通",

            layout: 'fit',

            closable: false                  //这个tab可以被关闭

        }, {

            id: "tab3",

            title: '图集',

            icon: '/Resources/Images/16x16_Classic/5_16.png',

            html: "此功能暂时没开通",

            layout: 'fit',

            closable: false                  //这个tab可以被关闭

        }, {

            id: "tab4",

            title: '商品',

            icon: '/Resources/Images/16x16_Classic/6_16.png',

            html: "此功能暂时没开通",

            layout: 'fit',

            closable: false                  //这个tab可以被关闭

        }]

    });

    //**************页面主体结束*****************

    var panel = new Ext.Viewport({

        border: false,

        layout: 'border',

        items: [

        {

            region: 'center',

            border: false,

            layout: 'fit',

            items: tabpanel

        }]

    });

 

你可能感兴趣的:(tabpanel)