PDA

View Full Version : Mouseover listener in Toolbar not working



visual-a
21 Dec 2010, 11:40 AM
I may just be doing this all wrong but I can get this to work on click but not on mouseover. I have a Tooltip that I want to load on mouseover ov a button in a toolbar:

first the tooltip which is a global variable:

var t = new Ext.ToolTip({
title: 'Tip',
width: 250,
//html: 'If you would like to find publications earlier than 6 months ago please utilize the Date Picker in the left column filters.',
autoLoad: {url: 'ajax-tip.html'},
dismissDelay: 15000,
closable: true
});

and next is the snippet from a gridpanel:

tbar: new Ext.Toolbar({
items: [{
xtype: 'button',
html: '<div class="displaynum">Displaying none</div>',
handleMouseEvents: false,
iconCls: 'help',
listeners: {
'render': function(){
this.on('mouseover', function(){
t.targetXY = this.getPosition();
t.show();
});
}
}/*,
handler: function() {
t.targetXY = this.getPosition();
t.show();
}*/
},{
xtype: 'button',
handleMouseEvents: false,
iconCls: 'help',
listeners: {
'render': function(){
this.on('mouseover', function(){
t.targetXY = this.getPosition();
t.show();
});
}
}/*,
handler: function() {
t.targetXY = this.getPosition();
t.show();
}*/
}]
}),

Any help would be greatly appreciated.

Alex

Animal
21 Dec 2010, 1:22 PM
http://dev.sencha.com/deploy/dev/docs/?class=Ext.Button&member=tooltip