I’m almost too embarrassed to ask, but I’ve been going around in circles for 2 hours and the documentation is not helping, although that could be my fault.
I have an SVG image embedded in my Web App. (ie I dragged and dropped it into a Xojo folder which I’ve named “Images” - I am not loading it from an external folder at runtime)
I want to populate an instance of HTMLViewer with this image - ie pass the string data of the SVG into the HTMLViewer using .LoadHTML(). I suspect this is absurdly easy/obvious, but I can’t work out the correct way to access the file’s string data. Could somebody point me to the correct way?
When I construct the SVG string data manually, it all works as expected.
It should just be referencing the SVG file by name since you dragged it in, right? I think SVGs reference like text files?
var sSVGXML as String = mySvgInTheNavigator
ctlHTML.LoadHTML(sSVGXML)
I’ve been quite enjoying that WebPicture.BootstrapIcon("name").Data provides the Bootstrap SVG. I haven’t needed to reference anything manually in Web 2.0 yet.
Hi Alberto,
I’m currently just testing this with the one image, but there are potentially several hundred to deal with, so although adding them as constants would work, I’d ideally like to find a solution that does not involve me having to maintain these values.
But yes, failing all else, hard coded strings are what I’ll have to go with.