PDA

View Full Version : Button not registering css class



pm13
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;
getGrids(buttonMonth);
}
});
//button.addStyleName("test");
//button.setTooltip("View reports for "+month);

css class:

.test
{
background-color:transparent !important;

}

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

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