PDA

View Full Version : How do you capture mouseover events for a panel header?



fifeflyer69
4 Jun 2012, 8:50 AM
I am attempting to capture mousedown events for a panel header and not having much luck.
I have adopted the MVC pattern and added the following handlers to this.control:



'#panel header': {
mouseover: function() {
console.log("ENTER");
}

mouseout: function() {
console.log("LEAVE");
},

click: function() {
console.log("CLICK");
},
}



I am successfully capturing the click events, but not the mouseover or mouseout events!
Should the above code work? If not, what do I need to do?

Any guidance is appreciated.

friend
4 Jun 2012, 10:55 AM
This worked for me:



somePanelInstance.header.el.on('mouseover', function() {
Ext.Msg.alert('Mouse Over!', 'You moused over the panel header!');
});

fifeflyer69
5 Jun 2012, 11:49 PM
Thanks - your solution worked for me as well. But I would have thought that if this worked, adding handlers to this.control should also work.