在treepanel里配置dockedItems
dockedItems: [{
xtype: 'toolbar',
style:"border-top:0px;border-left:0px",
items:[{
xtype:'button',
text:"刷新",
iconCls : "x-btn-text x-tbar-loading",
handler : function (){
treePanel.getStore().load();
},"-", {
iconCls: "icon-expand-all",
text:'展开',
tooltip: "展开所有",
handler: function(){ treePanel.expandAll(); },
scope: this
},"-",{
iconCls: "icon-collapse-all",
text:'折叠',
tooltip: "折叠所有",
handler: function(){ treePanel.collapseAll(); },
scope: this
}]
}],