Application.ShowLoader

Answered
0
0

Hi, hopefully an easy question. I’m trying to display the loader whenever a user clicks on a button. Each button creates a tabpage which takes a second or two before it is shown. I’ve tried using:

Application.ShowLoader = True
Application.Update(Me)

‘Create page code here

Application.ShowLoader = False

This code works the first time but every other click after it will not show the loader. Is this because I’m using this wrong or the time it takes to load the page is to short to show the loader? I would really like to show the loader regardless of how fast or slow something is just to let people know the application is doing something.

 

Thanks in advance!

 

Vincent

 

  • You must to post comments
Great Answer
0
0

The auto loader is removed when a response arrives to the browser. The additional time is probably the browser time to render many controls.

If you want to remove the loader after everything is actually visible and rendered on the browser use your first approach and turn the loader off in the Appear event of the control that you want to make sure is visible.

https://docs.wisej.com/api/wisej.web/general/control#appear

When showing the loader you can use Application.Update() as you did, or make the event async.

  • vincent_
    Thank you, I will give this approach a try
  • You must to post comments
0
0

Hi Vincent,

All you have to do is set the Button’s AutoShowLoader property to true.
Visit https://docs.wisej.com/api/wisej.web/buttons/wisej.web.buttonbase#autoshowloader for more info !

Best,
Alaa

//

  • You must to post comments
0
0

This kinda works but not fully. If I do this then the loader does show every time but it dissapears before the page is shown. There’s atleast a second delay before the page is actually show on my computer. This would likely be longer on an actual server. There’s no code other then just a big usercontrol with a lot of controls now, this will have a lot of code later.

  • You must to post comments
Showing 3 results
Your Answer

Please first to submit.