Page 1 of 1

How to Set the Image of an Image Control

Posted: Sun May 01, 2011 6:48 pm
by McJazz
Can you copy the image of an existing image control into another image control using code? I tried setting the ImageData, but the result was garbled.

Thanks

Re: How to Set the Image of an Image Control

Posted: Sun May 01, 2011 8:14 pm
by bn
Hi McJazz,

Code: Select all

put image 1 into image 2
or less obvious

Code: Select all

set the text of image 2 to the text of image 1
If you use imageData the dimensions of image object 1 and 2 have to be exactly the same, then it works. Above will adapt the image size.

Kind regards

Bernd

Re: How to Set the Image of an Image Control

Posted: Sun May 01, 2011 8:48 pm
by McJazz
Thanks. I thought it should be simple. It worked once I added ID to the image number.