Background image

415 views
Skip to first unread message

S. Oomes

unread,
Oct 20, 2008, 8:56:34 AM10/20/08
to Google Web Toolkit
Hello everyone,

I ám currently checking out GWT and im really impressed. The only
thing i ren into was the fact that i did'nt get a background image in
the application i was making. I want to use instead of the white
background a image i made. It must repeat in the complete page as
background. Is this possible to do and how do i do that.

I dont have any experience at all with java but im going to learn that
in my 4 semester (don't now the correct name) on my school. So if some
one knows the awnser please explain exact where i need to place the
code or code's. When you, the responder to this artikle, are dutch you
can mail me the dutch explanation in dutch. Or post it here when this
is allowed of course!

I'm looking forward to hear from you,

Greetings S. Oomes


bc

unread,
Oct 20, 2008, 5:47:32 PM10/20/08
to Google Web Toolkit
hey there,

You can just add a css style to any panel. For instance, i used
firebug to change the style on the box above so that there is a
repeating background image of the google logo. The style looks like
this. Screenshot http://drop.io/pytdu4r/asset/background-repeat

.cb {
background-image:url(http://www.google.com/intl/en_ALL/images/
logo.gif);
}

In the gwt code, you would have something like this:
SimplePanel container;
container.setStyle("cb")

later,
bryan

LincMii

unread,
Mar 25, 2012, 6:58:57 AM3/25/12
to google-we...@googlegroups.com, Google Web Toolkit
This did not work for me ... I am trying to apply this style to a canvas but for some reason the image just won't show.
Reply all
Reply to author
Forward
0 new messages