Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacControls/HTMLViewer Mac/HTMLViewer ScrollHeight
Function:
Required plugins for this example: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacControls/HTMLViewer Mac/HTMLViewer ScrollHeight
This example is the version from Wed, 7th Feb 2017.
Project "HTMLViewer ScrollHeight.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control HTMLViewer1 Inherits HTMLViewer
ControlInstance HTMLViewer1 Inherits HTMLViewer
EventHandler Sub Open() me.LoadURL "http://www.mbsplugins.de" End EventHandler
End Control
Control TestButton Inherits PushButton
ControlInstance TestButton Inherits PushButton
EventHandler Sub Action() dim lines() as string lines.Append "height: "+str(htmlViewer1.Height) lines.Append "scrollheight: "+str(htmlViewer1.scrollheightMBS) lines.Append "mainFrame.webview.scrollHeight: "+str(htmlViewer1.mainFrameMBS.webview.scrollHeight) lines.Append "mainFrame.frameview.frameHeight: "+str(htmlViewer1.mainFrameMBS.frameview.frameHeight) lines.Append "mainFrame.frameview.documentView.frameHeight: "+str(htmlViewer1.mainFrameMBS.frameview.documentView.frameHeight) dim s as NSScrollViewMBS = htmlViewer1.NSScrollViewMBS lines.Append "scrollView.contentSize.Height: "+str(s.contentSize.Height) MsgBox Join(lines, EndOfLine) End EventHandler
End Control
End Class
MenuBar MainMenuBar
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem EditSeparator1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem EditSeparator2 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins