You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Win/HTMLViewer Windows/Load HTML Test
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action()
HTMLViewer1.LoadURL "about:blank"
End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action()
if HTMLViewer1.Renderer = 0 then
// using IE
// IE needs to first load about:blank for this to work
if HTMLViewer1.IELoadHTMLMBS(TextArea1.Text) then
// ok
else
MsgBox "Failed to load html."
end if
else
// using WebKit
dim b as ChromiumBrowserMBS = HTMLViewer1.ChromiumBrowserMBS
b.MainFrame.LoadString TextArea1.Text, ""
end if
End EventHandler
End Control
Control TextArea1 Inherits TextArea
ControlInstance TextArea1 Inherits TextArea
End Control
Control HTMLViewer1 Inherits HTMLViewer
ControlInstance HTMLViewer1 Inherits HTMLViewer
End Control
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar