PDA

View Full Version : TreePanel and tbar: Toolbars.



bshagnasty
19 Aug 2008, 7:26 AM
Situation
I have a TreePanel and it has a tbar with a button in it.

The problem?
Every click on the whitespace of the TreePanel will trigger the click handler of the FIRST button in the toolbar config of "tbar"

Code


var tree = new Ext.tree.TreePanel({
el:'tree-div',
autoScroll:true,
animate:true,
enableDD:true,
containerScroll: true,
frame:true,
dataUrl: 'index.php?ppts_id=<?php tpl($_GET['ppts_id']) ?>&op=get_presenters',
tbar: new Ext.Toolbar({
cls:'top-toolbar',
items:['->',{
tooltip: 'Expand All',
handler: function(){ console.log('clicked')}
}]
}),
listeners: {
'click': function(n, e){
//some code
}
});


Whenever the white space is clicked (not the nodes), the space beneath the node listing. The click handler of the first toolbar button is clicked...

Can I disable this?