main page

Extjs4 tabpanel 中表单定宽居中

Ext.create('Ext.tab.Panel', {
    height: 400,
    renderTo: document.body,
    items: [{
        xtype: 'panel',
        title: 'Inner Panel One',
        width: '100%',
        flex: 2
    },
    {
        xtype: 'panel',
        title: 'Inner Panel Two',
        width: 250,
        flex: 4
    },
    {
        xtype: 'panel',
        title: 'Inner Panel Three',
        width: '50%',
        layout: {
        type: 'vbox',
        align: 'center'
        },
        items:[
            {html:'panel',width:500,height:60}
        ],
        flex: 4
    }]
});
View Code

 主要是看第三个页签的内容,

{html}可以改成{xtype:'mytestformpanel'}

把真正需要的formpanel放到一个普通的panel中,

1,普通的panel布局为vbox center

2,formpanel设置自己需要的宽度

posted @ 2014-01-05 16:36  weipan  阅读(883)  评论(0)    收藏  举报