html Viewer does not refresh until .show()

Im trying to implement a kind of contextual help, which displays local html pages in a floating window that changes when people navigate round the app.
However, Im finding that setting the page doesnt actually make the display change unless I actually click on the floating window.
.invalidate and .refresh dont do the business, either on the window or on the contained hmtlviewer

Is there anything else I can use to force the display to change ?

My HTMLViewer doesnt have a .reload option
Using MBS I have a ReloadMBS and a ReloadfromOriginMBS
Using either of those, the screen flashes but stays on the ‘old’ page
GoForward doesnt do it either.

Clicking on the window that has the viewer in it ‘wakes it up’ and it displays
Using .refresh on the window an/or the HTMLViewer doesnt work.

At the moment, I found that using .show on the window works.
But then it steals any sheet windows that display after that, so they appear attached to the help window instead of the the proper owner.
(.showmodal doesnt have a parent parameter for some reason…?)

So right now the only thing I have that works is

//set the url then

Bumping just in case anyone who could help, missed this.

My workaround (.show the html window then .show the main window again) is a bit rubbish when used on multiple screens: the ‘other screen’ slides into view for a second to display the help.

setting the page doesnt actually make the display change unless the window has the focus.
That must be a bug, surely?

Have you tried with a regular window, not a floating palette? Weird things can happen on palettes,

Oh and have you considered using the Apple Help viewer? It can be done with some simple declares… Oh, and making sure your HTML help in the Apple approved format. App Wrapper has a HTML validator tool that can help and it can be used to auto include the help into your application, but you still need the declares.

Thanks Sam.
Some ideas there to chew on.

Ive tried all available window styles.
Apple Help viewer may be an option, although this is for multi platform.
Im trying to implement something that is a bit like someone looking over your shoulder and pointing things out, rather than a system where a person needs to go hunting for info.
It works reasonably well when people have a large screen and can put the help window ‘beside’ the main one

The link I posted shows you how to reload the content in JavaScript…

Thankfully the Apple help is HTML, so on Windows you can resort back to using a HTMLViwer in a floating window (if it works on Windows).

I had contemplated that for a project that I designed earlier in the year, but I settled on actually using part of the document window.

Progress has been made, thanks to Michel, although not with the jscript.
As is common, the problem was my own making.

Michel said : look, you can do it in JScript
I read that, found no matching Xojo function, and ignored it.
Reminded of the link, I then thought of the JScript again and mentally dismissed it.
Obviously I couldnt expect the end user to click a link to refresh it… thats no better than activating the window… and there isnt a way to execute Javascript in code…

Except, there is a way to do that.

dim jssrc as string jssrc ="location.reload();" frmHelpPages.HTMLViewer1.ExecuteJavaScript(jssrc)

However, although the screen flashed, still no change until I activated the window.

By now, you can probably guess the issue:
My ‘change page’ code was actually in the Activate() event.
The public function which set the path didn’t also make the page load, because when the form was designed, I expected to set a path, then immediately show the window once.
The concept of displaying several pages wasnt in the design.

So the equivalent of frmHelpPages.HTMLViewer1.LoadURL thehelppage
is now working as expected.

I’ll probably still check out the Apple Help option.
Thanks both!