DesktopHTMLViewer.LoadURL

From Xojo Documentation

You are currently browsing the old Xojo documentation site. Please visit the new Xojo documentation site!
Method

HTMLViewer.LoadURL(URL as String)

New in 2021r3

Supported for all project types and targets.

Loads the passed HTTP URL. Any protocol other than HTTP may or may not work as that is dependent on operating system behavior.

Notes

On macOS, you need to ensure the URL is prefixed with "http://" or "https://" in order for it to load.

Example

This example loads a URL entered by the user in a TextField:

Var url As String = URLField.Value
If Left(url, 7) <> "http://" Then url = "http://" + url
HtmlViewer1.LoadURL(url)