I have an HTML viewer on a PagePanel in a window. I pass in some HTML text from a data source The HTML displays fine. If I set the page panel to the HTML viewer panel and leave it there for a minute, the window freezes up and I have to kill it. If I quickly view the HTML and then go to another page, it’s fine. But sitting still on the HTML for 30-40-50 seconds it freezes up and you’re done.
Here is the code:
Dim f As FolderItem = GetTemporaryFolderItem
Hi Anthony. Good thought. First I moved the HTMLViewer out of the panel, it still froze. Then I removed the PagePanel altogether - alas it still froze. Seems like the HTMLViewer is not getting along with Windows.
Is the HTMLViewer’s Renderer property set to Native or Webkit? I have custom components based on the Webkit renderer that are in wide use that do not exhibit this issue. If you are using the Webkit renderer, then it must be something system-specific.
Anthony, that’s great! It was set to native. I switched it to WebKit and it seems solid now. I saw that setting when I first added that object and wasn’t sure which to use. Subsequently I forgot about that setting. Thanks so much. I’ll keep it running for a while just to make sure it’s working. As I said, in a few instances it took up to 15 minutes or so before it froze. But I suspect we’re good.
The Native renderer basically uses whatever old version of Internet Explorer is available via COM on the system, and is a mess. 99% of the time, you’ll want to use WebKit, though it does add additional weight to your app distribution and has some other caveats (like the occasional hanging cefsubproc.exe process).
The WebKit renderer has the advantage of being more similar to Safari, but greatly increases the app app size; and also you don’t get WebKit updates (on Windows) until Xojo updates, you re-build, and re-release your software.