I'm a Smart GWT 3.1 Power Edition user. I'm trying to place an Img in a class that extends Toolstrip. I don't want to set the width and height explicitly as I won't always know them. I'm using code similar to the following in my Toolstrip's constructor:
Img imageLabel = new Img();
imageLabel.setImageType(ImageStyle.NORMAL);
imageLabel.setSrc("icons/icon.png");
addMember(imageLabel);
However, the icon image is being cut off. If I set an explicit width and height on the Img then it works. Am I doing something wrong?
Img imageLabel = new Img();
imageLabel.setImageType(ImageStyle.NORMAL);
imageLabel.setSrc("icons/icon.png");
addMember(imageLabel);
However, the icon image is being cut off. If I set an explicit width and height on the Img then it works. Am I doing something wrong?
Comment