//4 带顶部,底部,脚部工具栏的panel
HTML:
<div id="barPanel"></div>
JS:
var barPanel = Ext.create('Ext.Panel', {
id: 'barPanel',
title: '带工具栏的Panel',
//collapsible: true,
renderTo: 'barPanel',
width: 400,
height: 300,
tbar: [//顶部工具栏
{
text: 'button1',
handler: function () {
Ext.MessageBox.alert("Click", "点击了button1");
}
}, {
text: 'button2'
}
],
bbar: [//底部工具栏
{
text: 'button3'
},
{
text: 'button4'
}
],
html: '<p>empty</p>',
tools: [
{
id: 'save',
title: 'save',
text: 'save'
},
{
id: 'help',
text: 'help'
},
{
id: 'up',
title:'up',
text:'up'
},
{
id: 'close',
text: 'close',
handler: function () {
Ext.MessageBox.alert("Click", "点击了Close");
}
}
]
/*
buttons: [//footer工具栏
{
text:'button5'
},
{
text:'button6'
}
]
*/
});
tools中 id 可以为:
toggle,close,minimize,maximize,restore,gear,pin,unpin,right,left,up,down,refresh,minus,plus,help,search,save,print