Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/Win/HTMLViewer Windows/Load HTML Test
Function:
Required plugins for this example: MBS Linux Plugin, MBS MacBase Plugin, MBS MacControls Plugin, MBS Main Plugin, 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 Wed, 20th Oct 2015.
Project "Load HTML Test.rbp"
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 TargetWin32 then 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 elseif TargetLinux then dim l as LinuxWebViewMBS = HTMLViewer1.LinuxWebViewMBS l.MainFrame.LoadString TextArea1.Text, "text/html", "utf-8", "" elseif TargetMacOS then HTMLViewer1.LoadHTMLStringMBS TextArea1.Text, "text/html", "utf-8", "" else Break 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:

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS Win Plugin.





Links
MBS Xojo Plugins