Platforms to show: All Mac Windows Linux Cross-Platform
/MacControls/WebArchive Test
Function:
Required plugins for this example: MBS MacBase Plugin, MBS Main Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacControls/WebArchive Test
This example is the version from Sun, 27th Feb 2016.
Function:
Required plugins for this example: MBS MacBase Plugin, MBS Main Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacControls/WebArchive Test
This example is the version from Sun, 27th Feb 2016.
Project "WebArchive Test.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control HTMLViewer1 Inherits HTMLViewer
ControlInstance HTMLViewer1 Inherits HTMLViewer
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action()
HTMLViewer1.LoadURL "http://www.mbsplugins.de/"
End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action()
dim w as WebViewMBS = HTMLViewer1.WebViewMBS
dim d as WebDataSourceMBS = w.mainFrame.dataSource
dim a as WebArchiveMBS = d.webArchive
dim f as FolderItem = SpecialFolder.Desktop.Child("WebArchive test.webarchive")
dim b as BinaryStream = BinaryStream.Create(f)
b.Write a.data
End EventHandler
End Control
Control PushButton3 Inherits PushButton
ControlInstance PushButton3 Inherits PushButton
EventHandler Sub Action()
HTMLViewer1.LoadURL "about:blank"
End EventHandler
End Control
Control PushButton4 Inherits PushButton
ControlInstance PushButton4 Inherits PushButton
EventHandler Sub Action()
dim f as FolderItem = SpecialFolder.Desktop.Child("WebArchive test.webarchive")
dim b as BinaryStream = BinaryStream.Open(f)
dim s as string = b.Read(b.Length)
dim m as MemoryBlock = s
dim a as WebArchiveMBS = new WebArchiveMBS(m)
dim w as WebViewMBS = HTMLViewer1.WebViewMBS
w.mainFrame.loadArchive a
End EventHandler
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
The items on this page are in the following plugins: MBS MacControls Plugin.
Feedback: Report problem or ask question.