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

ext4的dockedItems有什么用?该怎么处理

2013-03-06 
ext4的dockedItems有什么用?里面为什么又要放个items呢?我以前用ext3.2的var panel new Ext.panel.Panel

ext4的dockedItems有什么用?
里面为什么又要放个items呢?我以前用ext3.2的

var panel = new Ext.panel.Panel({
    dockedItems: [{
        xtype: 'toolbar',
        dock: 'top',
        items: [{
            text: 'Docked to the top'
        }]
    }]
});

[解决办法]
举个例子就清楚了:
var panel = new Ext.panel.Panel({
    dockedItems: [{
        xtype: 'toolbar',
        dock: 'top',
        items: [{
            text: 'Docked to the top'
        },{
        xtype: 'toolbar',
        dock: 'boottom',
        items: [{
            text: 'Docked to the bottom'
        }]
    }]
});

[解决办法]
对该段代码解释就是在panel顶部放一个与panel同宽度的toolbar,在toolbar上放一个子部件,text为'Docked to the top'当然在toolbar上也可以添加其他的部件

热点排行