I didn't say "overwrite", I said "override". Minor semantic distinction, probably.
I had specific reasons to subclass. YMMV. On Jun 26, 4:12 pm, andreas <[email protected]> wrote: > Ok, that's everything but "overwriting". It's simply assigning a > different style. > > And by the way: why subclass? You can simply call setStylePrimaryName > on an instance of Button, no need for a subclass to just change the > style. > > On 27 Jun., 00:58, Jim Douglas <[email protected]> wrote: > > > > > Apparently I created a cascade of confusion here. When I said > > "override the default gwt-Button style", I simply meant subclass it > > and add something like this to the constructor: > > > setStylePrimaryName("my-custom-button"); > > > On Jun 26, 4:14 am, andreas <[email protected]> wrote: > > > > Are you sure it is possible to overwrite the default gwt-Button style? > > > > I tried it once and found out that it did not work. This was the case > > > because the default GWT styles are somehow otherwise injected than > > > manually added styles. The default style is loaded via style element > > > in the module xml. > > > > I found a link where it says that styles injected via module xml can > > > not be overwritten by hand. I'll have a quick look and paste it > > > here... > > > > There it > > > is:http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa... > > > > See Thomas Broyers answer. You can not overwrite default GWT styles, > > > unless using important rules. > > > > You should stick to writing your own CSS style and assigning it via > > > setStyleName(...). > > > > Greetings, > > > > Andreas > > > > On 25 Jun., 23:14, Jim Douglas <[email protected]> wrote: > > > > > Chris -- > > > > > PushButton is a styled DIV, but Button is a standard HTML button > > > > object. You want to use Button, and override the default gwt-Button > > > > style. > > > > >http://google-web-toolkit.googlecode.com/svn/javadoc/2.1/com/google/g... > > > > > On Jun 25, 3:50 am, Takapa <[email protected]> wrote: > > > > > > Hi, > > > > > > I have been using GWT for around 18 months via Smart GWT but have > > > > > decided to create a pure GWT project but having a few hiccups. > > > > > > I'm having a seemingly trivial problem with look and feel at the > > > > > moment. When I create a button it is coloured grey to white with a > > > > > gradient fill. I just want a regular HTML button that matches my OS > > > > > standard buttons. Can anyone tell me how to specify this either > > > > > programatically or via CSS. > > > > > > Thanks, > > > > > > Chris -- 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.
