Whats the MyJS in MyJS.setStyle(Widget w, String style, String value)? I am trying to set a style property programatically, but when I call myWidget.getElement().getStyle() I get the Error: Method "getStyle" with signature "()Lcom/google/gwt/dom/client/Style;" is not applicable on this object
myWidget is a defined within an UI Binder XML --> protected @UiField HTML myWidget; On 6 Feb., 01:54, Sky <[email protected]> wrote: > I just include my own CSS file (you can include it in the top html > file) and create styles inside it and set the style name via > myWidget.setStyleName(). > > If I just want to change one or two CSS properties I use a global > method: MyJS.setStyle(Widget w, String style, String value) > {w.getElement().getStyle().setProperty(style, value);} cause you can't > rely on their Style object being able to set/get ALL styles, plus it's > shorter than calling getElement().getStyle() EVERY time I want to set > a style. > > If I was on the GWT dev team I would create a setStyle(String style, > String value){} method right on the Widget class. > > On Feb 5, 6:35 pm, Gal Dolber <[email protected]> wrote:> You can... > > > ..copy the entire theme and customized it. > > or > > ..overlap the css classes that you want to customize in a css and include it > > (on each Widget there is a description of what css classes it uses) > > > 2010/2/5 dhoffer <[email protected]> > > > > How can I make some simple changes to the CSS GWT 2.0 uses for the > > > standard theme? > > > > How can I change the font family/name used for everything? (Is there > > > a global place for this?) > > > How can I change the color of the font used for everything? (Is there > > > a global place for this?) > > > How can I change the size of the font used by a some HTML widgets? > > > > I know these are basic questions, but would really appreciate help > > > getting started making some CSS changes. > > > > Some more questions...do I have to copy the GWT CSS, make changes, and > > > then include mine and not include GWT's? Or can I leave GWT's in > > > place and extend it somehow? > > > > Thanks! > > > > -- > > > You received this message because you are subscribed to the Google Groups > > > "Google Web Toolkit" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]<google-web-toolkit%2Bunsubs > > > [email protected]> > > > . > > > For more options, visit this group at > > >http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
