Thanks, that works. It's still a workaround, but better than the other option.
I have some other issues with image slider of which I have solved two of them:
1)
I need to update a label showing the image title. The title comes from a JSON structure together with the image source and a target url. Updating the label in the GetImage handler does not work because of caching.
I have solved it by creating a new handler, OnShow. In the end of ShowImage I have added:
CallSub2(mCallBack, mEventName & "_OnShow", CurrentIndex)
And the handler is then:
Sub ImageSlider1_OnShow (Index As Int)
Dim image As Map
image = Starter.imageList.Get(Index)
lblSlider.Text = image.get("title")
End Sub
May I propose that you update the library with such a handler as I think it could be useful for many developers?
2)
My next issue is that I would like a click handler for the current image. So if you press it, some action will happen such as opening an url in my case.
I found a
solution here (please note that there is a typo in your post, a missing double quote)
Again, wouldn't it be a good idea to add this handler to the library? I have spent a couple of hours trying different solutions until I stumpled upon this post. It would be nice if this worked "out of the box" so to speak. And for developers who don't need, it doesn't do any harm.
Edit:
This version is probably better because you get the index
3)
Lastly, I would like the slider to have rounded corners. If I add a corner radius, it shows up initially, but as soon as the first image is loaded, the rounded corners are gone. Then I though I was smart and added a background panel and gave that rounded corners. But alas, again as soon as the image shows up, the rounded corners disappear.
I can't figure out why, so how do I add permanent rounded corners to the image slider?