How do you clear an image?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Ron Zellner
Posts: 106
Joined: Wed May 31, 2006 9:56 pm
Contact:

How do you clear an image?

Post by Ron Zellner » Mon Nov 24, 2008 1:19 am

What's the best way to clear (erase) the content of an image that has just been drawn in with the pencil tool?
How would I set the content of one image to that of another?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Mon Nov 24, 2008 7:50 am

Image objects have a 'text' property that you can 'set' which allows you to copy the contents of one image to another one.

Code: Select all

set the text of image 2 to the text of image 1
or even shorter

Code: Select all

put image 1 into image 2
HTH,

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Klaus
Posts: 14208
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Post by Klaus » Mon Nov 24, 2008 9:16 am

Hi Ron

to clear an image:
...
put empty into img "your image here"
...


Best

Klaus

Post Reply