I have an WebImageView with the name ImageView_Materialpicture.
The ImageView_Materialpicture is showing a picture from an url:
ImageView_Materialpicture.url = “http://…”
Problem 1
When the user pressed a button, I want to delete the picture, not at the url, just in the ImageView.
I’m tried a lot:
ImageView_Materialpicture.picture = nil
ImageView_Materialpicture.url = “”
ImageView_Materialpicture.url = “http://…” [Pointing to a 1x1 transparent pixel in .png]
How can I delete the picture?
Problem 2
When the user pressed a button, I want to change the picture, this doesn’t work too:
ImageView_Materialpicture.url = “http://…” // link to another picture.
Xojo shows the old picture. Is there something like a cache? Can I deactivate this cache?
[I’m using Xojo 2015.4.1.]
It is a bug in the Xojo version you are using.
If you can’t use a more recent version create a webpicture from an empty image and set the url of this empty image to delete the shown image.
-
imageview1.url = ""
imageview1.Picture = nil
-
This works here :
imageview1.url = ""
imageview1.url = "http://fontmenu.com/pics/engineering.gif"
No, I can’t go up to 2016.2 because in 2016.1 and 2016.2 is a huge MySQL bug, when you use your compiled app on a windows server 2012. Try it yesterday again: 2016.2 the picture = nun works, but the MySQL bug is still there. Xojo didn’t fix it.
Thanks Michael, but both doesn’t work for me.
Even when I try the other way: first .picture = nil and then .url = “”.
Would be perfect if Xojo fix the mysql bug in 2016.2 with a very quickly 2016.2.1 …
Good idea, but the pictures are uploaded with the Xojo “WebFileUploader”-Control to a Webspace.
I’m using the URL to the picture in the WebImageview, I think WebCanvas can’t use URLs, in WebCanvas you have to drag & drop the picture to the Xojo project, but I don’t have the pictures at compile-time.