开发者

GWT Images Set Size

开发者 https://www.devze.com 2023-02-15 20:01 出处:网络
I have some images I am swapping out in a image widget by setUrl.The problem is I开发者_Python百科 start with smaller images then when I load a larger image into the image widget it remains the same s

I have some images I am swapping out in a image widget by setUrl.The problem is I开发者_Python百科 start with smaller images then when I load a larger image into the image widget it remains the same size as the smaller image.

Is there any way I can make the widget auto adjust it's width and height to the image I am loading into it.

Right now I am keeping the dimesions in an array and adjusting size accordingly.

Thanks


Have you tried setting the new images by calling setResource(ImageResource)? This works for me.

0

精彩评论

暂无评论...
验证码 换一张
取 消