Platforms to show: All Mac Windows Linux Cross-Platform
/Win/HTMLViewer Windows/Load HTML Test
Required plugins for this example: MBS Win Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /Win/HTMLViewer Windows/Load HTML Test
This example is the version from Sun, 5th Nov 2022.
Project "Load HTML Test.xojo_binary_project"
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
End Project
See also:
- /Win/HTMLViewer Windows/HTMLViewer execCommand
- /Win/HTMLViewer Windows/HTMLViewer Extensions
- /Win/HTMLViewer Windows/HTMLViewer get html source
- /Win/HTMLViewer Windows/HTMLViewer Image
- /Win/HTMLViewer Windows/HTMLViewer Post and Headers
- /Win/HTMLViewer Windows/IE Properties
- /Win/HTMLViewer Windows/WebKit - Chromium/HTMLViewer with WebKit on Windows
- /Win/HTMLViewer Windows/WebKit - Chromium/WebPlugins
- /Win/HTMLViewer Windows/WebKit - Chromium/Windows WebKit Cookies
- /Win/HTMLViewer Windows/Zoom HMTLViewer
The items on this page are in the following plugins: MBS Win Plugin.