How to make a progress bar while a webpage is loading?

Hi folks,
I have a main webpage that has quite a lot of pages (inside a webpanel) dialogs and sub-dialogs
that takes some time to show. not so much but depending on the bandwith at least 5+6 secs to load.
I only call mywebpage.show.

how can I implement a progressbar while this webpage loads ?
I have the previous page (the login page) for 2secs, then a white page for the remaining 4secs
I don’t see how I could display something else as I already try to display something that don’t displays…

thanks for any hints on this.

Jean-Yves, it would be better to restructure your web page so that it takes a shorter time to load. I know your page will be slow to open but quick to use, but perhaps loading some data at the time it is needed and not before is a better improvement. You could also consider splitting the page into different pages. You should also debug through your opening code to make sure it is performing as you expect. Sometimes events fire when you don’t realise and this can slow things down unnecessarily.

We us a system of 3 timers in this case.

Timer one puts up a progress wheel in a dialog box. Effectually Locking the screen it then calls timer 2

Timer 2 runs all the heavy code then calls timer 3

Timer3 3 unlocks the screen by closing the dialog/progress wheel.

2 Likes

well, in my case the “heavy code” is only mainwebpage.show !

Well, I guess my suggestion is not of much use. :crazy_face:

FWIW when we write a login page, we start out with a 500 tick delay
Then we double it for each failed login.

1 Like
Forum for Xojo Programming Language and IDE. Copyright © 2021 Xojo, Inc.