Page 1 of 1

Import snapshot and use as icon of button

Posted: Wed Jun 08, 2011 11:39 pm
by et_phone_home
HI

How can i copy a potion of an image and set that copy as the icon of a button?

I'm starting using Livecode:(

I use "import snapshot from rectangle 0,0,50,50 of image ID 1500" and i get a 50x50 image in the center of the screen. How can i set that image as an icon of a button?

THX

Re: Import snapshot and use as icon of button

Posted: Wed Jun 08, 2011 11:45 pm
by bn
Hi et_phone_home,

have a look at this lesson:

http://lessons.runrev.com/spaces/lesson ... con-images

it explains it very well and you can adapt it to your snapshot image if you take the id of the snapshot image. Better yet you could change the id of the snapshot image to a range that is not used by Livecode (e.g. > 6000) and then set the icon of the button to that id.

Kind regards

Bernd