PDA

View Full Version : Disabled state of panel tool buttons?



louiscooper
4 Jan 2013, 10:27 AM
It's possible that this is a feature request:

When a panel's title buttons (tools) are disabled, extjs has a transparent square that covers the button. A square looks bad covering custom buttons that are not squares. How do you have custom disabled states based on an image file?

The attached image has 2 collapsed panels that show the mouseover state. In this case, we want to disable a Refresh button.

skirtle
4 Jan 2013, 10:45 AM
Take a look at onDisable:

http://docs.sencha.com/ext-js/4-1/source/AbstractComponent.html#Ext-AbstractComponent-method-onDisable

It looks like you might want this:

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.panel.Tool-property-maskOnDisable

Using a different icon should be easy enough via disabledCls:

http://docs.sencha.com/ext-js/4-1/#!/api/Ext.panel.Tool-cfg-disabledCls