On 16 nov, 00:32, Frédéric MINATCHY <[email protected]> wrote: > Hello... > > As I said before I used the ImageResource in my code like this : > > public interface UsersAdministrationImagesResources extends ClientBundle { > > public static UsersAdministrationImagesResources INSTANCE = > GWT.create(UsersAdministrationImagesResources.class); > > @Source("user_add.png") > ImageResource addUserImage(); > > @Source("user_delete.png") > ImageResource deleteUserImage(); > > @Source("user_edit.png") > ImageResource editUserImage(); > > I get the images by using > GWT.create(UsersAdministrationImagesResources.class). > > And then on Internet Explorer 7 some images ont gwt and smartgwt component > are not correctly displayed. > > On the gwt button all the image resources are shown (whereas only one should > be shown)
As Dave wrote, ImageResource generates data: URLs for those browsers that supports it (everyone except IE6/7) and a "sprite image" (see http://css-tricks.com/css-sprites ) otherwise; so what you see really is the intended behavior. > and on the smartgwt elements a white square is shown. I don't know what SmartGWT (or rather, SmartClient) does. > What is the difference with @sprite and Image bundle? @sprite will generate the appropriate CSS properties whichever technique is used: "background: url(data:....)" for all browsers but IE6/7, and a bunch of properties for IE6/7 (background-image, background-position, width and height; see link above). Using an Image widget with an ImageResource does exactly the same as @sprite does at the CssResource level. See http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideClientBundle.html#ImageResource and http://code.google.com/intl/fr-FR/webtoolkit/doc/latest/DevGuideClientBundle.html#Image_Sprites > How can I choose to use explicitly one of them? > > Thank you for clues... I hope they will help me to find a correct solution. > > But if you have another idea do not hesitate. > > regards. > > Fred > > 2010/11/15 Thomas Broyer <[email protected]> > > > > > > > > > > > On 15 nov, 11:38, Frédéric MINATCHY <[email protected]> > > wrote: > > > Thank you for your advise... > > > > But is there a way to make it work with all browser?? > > > ImageResource really is designed to work with either the Image widget > > or a @sprite in a CssResource. > > > -- > > 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%2Bunsubs > > [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.
