Page 1 of 1
Cear picture does not work?
Posted: Fri May 26, 2023 11:13 am
by dbeugeling
Hello,
Maybe I'm wrong, but I cannot get an Image cleared.
I made a button with this code:
on mouseUp pButtonNumber
put empty into image "imgOne" of card "crd1"of stack "stckPicDelete"
end mouseUp
but nothing happens!
Any Thoughts?
Dirk
Re: Clear picture does not work?
Posted: Fri May 26, 2023 11:46 am
by richmond62
Well, I have just spent 15 minutes messing around and am getting nowhere, so I have a very silly suggestion as to how this might be solved:
-
-
Code: Select all
on mouseUp
put the width of img "imgOne" into WIDD
put the height of img "imgOne" into HITE
delete img "imgOne"
create image
set the name of the last image to "imgOne"
set the showBorder of img "imgOne" to true
set the width of img "imgOne" to WIDD
set the height of img "imgOne" to HITE
set the loc of img "imgOne" to 200,145
end mouseUp
Oh, and while I am 'here': please try to put bits of code in your messages like this:
-

- SShot 2023-05-26 at 13.45.39.png (43.72 KiB) Viewed 2102 times
Re: Cear picture does not work?
Posted: Fri May 26, 2023 11:52 am
by Klaus
Hi Dirk
dbeugeling wrote: ↑Fri May 26, 2023 11:13 am
Code: Select all
on mouseUp pButtonNumber
put empty into image "imgOne" of card "crd1"of stack "stckPicDelete"
end mouseUp
that only works for IMPORTED images, but you have a REFERENCED image on your card.
This works in that case:
Code: Select all
...
set the filename of img "your pic" to EMPTY
...
Best
Klaus
Re: Cear picture does not work?
Posted: Fri May 26, 2023 12:47 pm
by dbeugeling
Hello Klaus,
Thank you for your fast reply!
Dirk
Re: Cear picture does not work?
Posted: Fri May 26, 2023 1:41 pm
by Klaus
Graag gedaan, Dirk!
