-
Answered: How to create ImageResource?
Answered: How to create ImageResource?
It's not clear to me how to create/use ImageResource. I'm trying to create a button and give it an icon like this:
TextButton button = new TextButton();
button.setIcon( anImageResource ) -- and this is what I've no idea how to do.
Please help. Thanks.
-
Best Answer Posted by
icfantv
Here's how we do it:
public interface Images extends ClientBundle {
public Images INSTANCE = GWT.create(Images.class);
@Source("foo.png")
ImageResource foo();
...
}
Note that the PNG would need to be in the same package directory as the class.
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us