Hi, and how do you use the image? You use someContainer.setStyleName(resources.css().withRepeatedBackground());
On Wed, Dec 16, 2009 at 4:30 PM, Thomas Broyer <[email protected]> wrote: > > On Dec 16, 12:03 pm, mariyan nenchev <[email protected]> > wrote: > > Hi, > > > > Does any one know how to use image as background using repeat-x or > repeat-y > > with ClientBundle? For example if you have one image 1x1000px and you > need > > to repeat the image as background how can you do it with ClientBundle and > > CssResource? For now i am using css styles and specify the image url in > the > > css but this way my application will download every image with separate > > request. I tried to anotate the Image with REPEAT_HORIZONTAL (in the > client > > bundle) but no effect. > > Please help. > > This works OK for me (I'm styling DialogBox widgets with border images > using this technique): > > interface Resources extends ClientBundle { > @Source("style.css") > Styles css(); > > @ImageOptions(repeatStyle=RepeatStyle.Horizontal) > ImageResource background(); > } > interface Styles extends CssResource { > String withRepeatedBackground(); > } > > And in style.css: > @sprite .withRepeatedBackground { > gwt-image: "background"; > } > > -- > > 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%[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.
