Custom Loading Screen

I have a situation where I am executing some queries, execution can take time therefore I want to show some kind of loading screen or a custom gif while the execution is done.
I have a few options.

  1. ['cursor']='wait'
  2. Popup with gif, show it for few seconds and then close it

I don't like the first one because it only acts on the control where we are clicking.
I want to use something that takes the whole screen for few moments.

Can I do the option 2?
I really don't know if I can use a custom gif in a view(popup) and how do I open it and close it from a single button,
e.g Button_1_clicked, open popup, 1,2,3,4,5 close popup automatically

I am looking for a solution where I don't have to use css. I like to do it via script.

Hello,

I´m using the second option, I think is more efective, a popup with a gif,

when I start my filter function I add

def runAction(self, event):
		
		
	system.perspective.openPopup(
	    id="isLoading-popup", 
	    view="Page/IsLoading",
	    title="",
	    modal=True,
	    width=273,
	    height=128,
	    overlayDismiss=False 
	)

Then at the end of my function I add:

def runAction(self, event):
	

	
	system.perspective.closePopup(id="isLoading-popup")

You just need to find a cool .gif to show while loading.

Cheers

1 Like

Instead of GIF just use a progress component,

Set the mode accordingly.

2 Likes