If I understand you correctly you just wish to control each button in
your application.

If you wish to replace the complete default style that is used for
button then use the following

    button.setStyleName("mystyle");

CSS file would be

.mystyle {
  <place your styles here>
}

Create a style for each button and you are done.  By doing this it
allows you to change the program look without changing the code.

You can also use the CSS cascading ability by appending a style to
your button, I have found issues in this area from time to time, but
works most of the time.

    button.addStyleName("myextstyle");

CSS

.myextsyle {
  <add your styles>
}

>From what I understand this should still use the normal style and add
this to the list.  I have not used this

or you can

            button.addStyleDependentName("myextstyle")'

.gwt-Button-myextsyle {
  <add you styles>
}

I hope I got the above correct if not some else please show the
correct method.

Hope this helps Donald W. Long





On May 22, 3:32 am, abhiram <[email protected]> wrote:
> Hi,
>
>   I wanted to know the procedure to add images to PushButtons.
>   I have found a css style by which i can add it. But that would mean
> that for every button with an image, i need to write a style rather
> than having a single style. Is there any way to specify the image for
> the face of the push button from the code itself?
>
> regards,
> Abhiram
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to