PDA

View Full Version : How to mouseover checkbox?



louiscooper
27 Mar 2012, 9:10 AM
I've tried for some time, now it's time to hit the forums...

How does one apply a mouseover on a checkbox? This did not work for me:

var panel = Ext.create('Ext.panel.panel', {
items: [{
xtype : 'checkbox',
listeners :
{
mouseover: function()
{
console.log("Roll");
}
}
}]
});



I also tried mouseover on the panel, since I noticed (in docs) that mouseover is not a checkbox event. This doesn't seem to do the trick either:

iiComp.on('mouseover', function()
{
console.log("this? : " + this);
});

iiComp being either a checkbox or panel.

mitchellsimoens
27 Mar 2012, 12:09 PM
Try with el:


listeners : {
el : {
mouseover : fucntion(e, t) {...}
}
}

khmurach
27 Mar 2012, 12:24 PM
Try with el:


listeners : {
el : {
mouseover : fucntion(e, t) {...}
}
}
Your handler will be called also on label mouseover.
To handle only checkbox see this demo http://ext4all.com/post/how-to-mouseover-checkbox

louiscooper
18 May 2012, 7:31 AM
I ended up doing this:

theComponent.el.on('mouseover', function (e) {


});