SmartGWT: Applying style from CSS

UnegoBelanese

New Member
I have a IButton instance and I want to change its name and color after click.\[code\] button.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { if(button.getTitle().equals("Enabled")) { button.setTitle("Disabled"); button.setTitleStyle("disabledButton"); } else { button.setTitle("Enabled"); button.setTitleStyle("enabledButton"); } } });\[/code\]As we do in general GWT project, I have added following to the default .css file:\[code\].enabledButton { color:green;}.disabledButton { color:red;}\[/code\]But when I run the application, it is not showing either red or green color. Is there any other way in SmartGWT to apply CSS styles?
 
Back
Top