Hi,
I'm trying to create a separate Button css class, that should be accessible
by a ClientBundle. My goal is to change button styles programmatically by
application state.
The following applies the button style, but does not change the background,
so somehow the -ok dependent stylename is not taken into account. Why?
.myButton {
background: white;
}
.myButton-ok {
background: green;
}
public interface MyButtonResource extends ClientBundle {
public static final MyButtonResource INSTANCE =
GWT.create(MyButtonResource.class);
@Source("MyButtonResource.css")
Style css();
interface Style extends CssResource {
@ClassName("myButton")
String buttonStyle();
@ClassName("myButton-ok")
String buttonStyleOK();
}
}
MyButtonResource.INSTANCE.css().ensureInjected();
setStyleName(MyButtonResource.INSTANCE.css().buttonStyle());
button.addStyleDependentName(MyButtonResource.INSTANCE.css().buttonStyleOK());
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.