Re: programatically using CssResource styles in 2.0
I tried to understand the problem and the solution and spend some time
to fix the problem. But I always get compiler errors. Would be glad
if you could give me the full solution.
On Jan 25, 10:36 am, Thomas Broyer <t.bro...@gmail.com> wrote:
> On Jan 25, 5:38 am, ross <ross.m.sm...@googlemail.com> wrote:
>
>
>
>
>
> > Hi,
>
> > This is probably a very noob question but I have updated my project to
> > GWT 2.0 and I am trying to rewrite some of my Widgets to use
> > Declarative UI because it looks very promising and cool!
>
> > However, I am a little stumped on how to apply CssResource styles
> > dynamically in my code. I found the trailing info on the site (http://
> > code.google.com/webtoolkit/doc/latest/DevGuideUiBinder.html) and
> > copied it here for convenience. The part that stumps is me is the
> > following lines:
>
> > void setEnabled(boolean enabled) {
> > getElement().addStyle(enabled ? : style.enabled() : style.disabled
> > ());
> > getElement().removeStyle(enabled ? : style.disabled() :
> > style.enabled());
> > }
>
> > There do not appear to be addStyle(String) and removeStyle(String)
> > methods in the Element class?? Am I missing something obvious? I
> > hope so!
>
> The methods are actually named addClassName and removeClassName.
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home