I am trying to find a class or plugin (happy to pay for it) that would allow me to display formatted multi-line labels that supports:
I know I could use the HTMLviewer but I dont want to use an iframe within the generated output
Why? It will do everything you need.
Check out the HTMLArea sample control in the WebSDK. That’ll probably do what you need.
iframes are not ideal to use in mobile apps as they leak memory and slow things down. I worked with a team last year in the UK who did some extensive testing using Android / iDevices and all of them got slower and had leaks when you had a site open for many hours. The iframes were the cause.
Also the iframe is totally overkill when all I really need is a DIV block with overflow so that scrollbars appear. I am sure it must be possible to do this using the WebSDK or something else but just cant get my head round it at the moment.
This is the definition of a WebContainer.
But how do I display the content e.g. bold, underlined, colour etc without using the HTMLviewer on the WebContainer?
If you don’t want to use an iframe then you can directly ‘inject’ html to the WebContainer control.
I’m guessing that had something to do with what was being done in the iframes. Never the less, Guy’s suggestion will work if you want a div.
It still depends on what is going on in the iframe. If you were to use a HTMLViewer to display your Xojo-generated HTML you would be triggering 0 extra HTTP requests and loading no external files into the DOM. I bet you would have difficulty measuring the time difference…if any…between that and the div.
If you’re loading a complex page into an iframe that uses multiple external files then you will be generating additional HTTP requests and all of that has to be parsed into the DOM. This was the stackoverflow issue: the guy was loading all of his CSS over and over again when he didn’t need to.
“Frames are slow on mobile” is one of those memes, like “BASIC is slow, use C++”, that glosses over the important details.
Daniel, interesting points and I think you are probably right. I have done a little bit of testing using a test server I have really bad bandwidth and it is impossible to see any delay when using the iframe method. Also I am not seeming any memory leaks when loading lots of iframes on either Chrome or Safari. I think I am going to risk it (I dont think their is really much risk) and use iframes.
Thanks everyone for help and suggestions.