View Full Version : Button not registering css class

29 Aug 2011, 5:18 AM
I've added a css class to my button but it's not registering it.

The button is nested inside a panel but I'm sure if that's relevant to the css class or not? Add and Set style name didn't work either.

The code for my button is:

var button = new Ext.Button({
text: month,
cls: 'test',
handler: function(button){
var buttonMonth = button.text;
//button.setTooltip("View reports for "+month);

css class:

background-color:transparent !important;


29 Aug 2011, 9:41 PM
there's no such thing as addStyleName. Try addClass

30 Aug 2011, 12:01 AM
That doesn't work either.