读书人

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

发布时间: 2013-03-06 16:20:31 作者: rapoo

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上也可以添加其他的部件

读书人网 >JavaScript

热点推荐