Saturday, September 11, 2010

Re: UiBinder with background-image and ImageResource

Here's a simple example WITHOUT external css file. It works, providing the ClientBundle and the ui.xml are in the same package. I believe you can use them from different packages but I still haven't worked out how.

<ui:with type="blah.client.MyClientBundle" field="cb"/>
<ui:image field="loading" resource="{cb.loading}"/>
<ui:style>
  @sprite .loader1 {
     gwt-image: 'loading';
     padding-left: value('loading.getWidth','px');
     width: auto;
     height: auto;
}
</ui:style>


and the client bundle would be something like...

public interface MyClientBundle extends ClientBundle {
   @Source("loading.gif") ImageResource loading();
}

On Sun, Sep 12, 2010 at 9:54 AM, GWTNewbie <venkyvb@gmail.com> wrote:
Any thoughts as to how this could be done using <ui:style> without
using external CSS files ?

On Aug 25, 4:06 am, Eirik Brandtzæg <eir...@eirikb.no> wrote:
> Hello
>
> Craigo:
> I think the point is to not have an external CSS file, but using <ui:style>
> directly.
>
> Antonie:
> Will the feature of bundling sprites still work with this method?
>
> --
> Eirik Brandtzæg

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment