htmlviewer content height

I’m trying to find a way of getting the height of the content within a web viewer - i.e. the same figure that determines the maximum value of the vertical scrollbar on the htmlViewer.

I’ve tried:

all return the same height - i.e. the height of the htmlViewer.

I believe in Swift it is webView.scrollView.contentSize.height - but I can’t find equivalent in Xojo, MBS or MacOSLib extensions.


I thought you had found it for me there Tim…

Had to do it like this:
dim sv as NSScrollViewMBS = HTMLViewer1.NSScrollViewMBS
dim h4 as integer = sv.contentSize.height

But it still came out with the height of the htmlViewer instance.

I’m just guessing from documentation. You can get the content height from Javascript, but I don’t know how well that translates to the scrollbar values.

that one works.

Thank you Christian - that’s better.

[quote=314390:@Christian Schmitz]htmlViewer1.mainFrameMBS.frameview.documentView.frameHeight
that one works.[/quote]

Is there a Windows version of this?

HTMLViewer IEScrollHeightMBS maybe?

That worked. Thank you Christian!