How can I draw images in their actual size? Going off of this post:
http://forums.smartclient.com/showth...mage+full+size
I am doing the following:
But the img.adjustForContent is being called before the image is loaded. If I wait tilll the image is done being loaded and click the adjust button it works fine.
How can I know when the image is done being loaded so I can call the adjustForContent method?
SmartGWT 2.1, FF
http://forums.smartclient.com/showth...mage+full+size
I am doing the following:
Code:
final Img img = new Img(urlToImage); img.setImageType(ImageStyle.NORMAL); img.addDrawHandler(new DrawHandler() { public void onDraw(DrawEvent event) { img.adjustForContent(true); } }); layout.addMember(img); IButton adjustButton = new IButton("Adjust"); adjustButton.addClickHandler(new ClickHandler() { public void onClick(ClickEvent event) { img.adjustForContent(true); }}); layout.addMember(adjustButton);
How can I know when the image is done being loaded so I can call the adjustForContent method?
SmartGWT 2.1, FF
Comment