*newbie* Can't add toolbar buttons to Treepanel
But if I add a button to my treepanel it is displayed at the bottom (like a submit button).
I want to have toolbarbuttons (under the treepanel title) with icon (later I want to add dropdowns if possible)
What am I doing wrong? :-?
var tree = new Tree.TreePanel({
title: 'Template Structure',
el:'tree-div',
useArrows:true,
autoScroll:true,
animate:true,
enableDD:true,
containerScroll: true,
split : true,
// auto create TreeLoader
dataUrl: 'treeloader.php',
rootVisible : true,
root: {
nodeType: 'async',
text: 'template',
draggable:false,
id:'source'
},
buttons: [{text: "blah"} ]
});
var tree = new Tree.TreePanel({
title: 'Template Structure',
el:'tree-div',
useArrows:true,
autoScroll:true,
animate:true,
enableDD:true,
containerScroll: true,
split : true,
// auto create TreeLoader
dataUrl: 'treeloader.php',
rootVisible : true,
root: {
nodeType: 'async',
text: 'template',
draggable:false,
id:'source'
},
tbar: [ {
text: 'file',
iconCls: 'my-icon',
handler: function() {
}
},
{
xtype: 'tbseparator'
}]
,
buttons: [{text: 'Save'}]
});
tbar: [{
text: 'blabla',
iconCls: 'my-icon',
menu: new Ext.menu.Menu({...}
}]
#If you have any other info about this subject , Please add it free.# |