PDA

View Full Version : Property handleMouseEvents, but for the click event



BrunoSales
14 Mar 2012, 3:58 AM
Hi,

I need to disable the style of the click event, because the button will only serve to tooltip. I know for the event mouseover, mouseout and mousedown has the property handleMouseEvents.

Thankz.

chramer
14 Mar 2012, 4:50 AM
There is [/URL][URL="http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.button.Button-cfg-pressedCls"]pressedCls (http://docs.sencha.com/ext-js/4-0/#%21/api/Ext.button.Button-cfg-pressedCls)property

Ext.create('Ext.Button', {
text: 'Click me',
renderTo: Ext.getBody(),
handler: function() {
},
pressedCls: ""
});

BrunoSales
14 Mar 2012, 5:27 AM
Yes, but what class I need to use to cause any effect on click event?

chramer
14 Mar 2012, 5:33 AM
I set an empty class here, so there will be no effects!

pressedCls: ""

http://jsfiddle.net/serju/JxwdX/ --> no click effects here

BrunoSales
14 Mar 2012, 5:44 AM
I noticed that when I put together the property 'handleMouseEvents: false" does not work. :((

BrunoSales
14 Mar 2012, 5:48 AM
Ext.create('Ext.Button', {
text: 'Click me',
handleMouseEvents: false,
renderTo: Ext.getBody(),
handler: function() {},
pressedCls: ""
});

chramer
14 Mar 2012, 5:55 AM
This works :


Ext.create('Ext.Button', {
text: 'Click me',
focusCls: "",
overCls: "",
pressedCls: "",
handler: function() {},
renderTo: Ext.getBody(),
});

http://jsfiddle.net/serju/JxwdX/2/

BrunoSales
14 Mar 2012, 6:03 AM
Now it worked, thanks for the help.