PDA

View Full Version : changing cursor type on button disabled



Golden.Vulture
26 Mar 2012, 10:11 PM
Hi I want to change the cursor type from hand to default when a button is disabled.
I wrote a cursor property -> cursor:default in style tag of button but it didnt help.

Any ideas guys ?

I found a improvement usability in ext GWT here : http://www.sencha.com/forum/showthread.php?74494-IMPROVEMENT-USABILITY-Button-and-ToggleButton-when-disabled-cursor-style

Do we have something like that in extjs 4 ?

mankz
26 Mar 2012, 10:18 PM
You can set your own button "disabledCls" and use Firebug to figure out what the CSS rule should be.

http://docs.sencha.com/ext-js/4-0/#!/api/Ext.AbstractComponent-cfg-disabledCls

dr-dan
17 Aug 2012, 11:13 AM
Unfortunately the cursor is declared way down the chain - in fact on the span inside a button tag!? The disabledCls actually goes on the outer div containing this button and span - makes styling these buttons a really really ugly hack

Here you go:

Say you use


disabledCls: 'disabledButton'

the css you need is:



.disabledButton .x-btn-inner { cursor: default !important; }
.disabledButton .x-btn-center { cursor: default !important; }


or override the classes generated by ext


.x-btn-disabled .x-btn-inner { cursor: default !important; }
.x-btn-disabled .x-btn-center { cursor: default !important; }