# Custom Loading Screen

**URL:** <https://forum.inductiveautomation.com/t/custom-loading-screen/101479>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [January 28, 2025, 10:02am UTC](https://forum.inductiveautomation.com/t/custom-loading-screen/101479 "2025-01-28T10:02:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Farhan\_Basheer](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/farhan_basheer/32/66759_2.png) [@Farhan\_Basheer](https://forum.inductiveautomation.com/u/Farhan_Basheer)\
**Post date:** [January 28, 2025, 10:02am UTC](https://forum.inductiveautomation.com/t/custom-loading-screen/101479/1 "2025-01-28T10:02:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Alejandro\_Alaco](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/alejandro_alaco/32/59849_2.png) [@Alejandro\_Alaco](https://forum.inductiveautomation.com/u/Alejandro_Alaco)\
**Post date:** [January 28, 2025, 11:52am UTC](https://forum.inductiveautomation.com/t/custom-loading-screen/101479/2 "2025-01-28T11:52:58Z")

</div>

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

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

```

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/5/d5f6470f874e7b9c3565b0dbbc254809b949d752.png)

Then at the end of my function I add:

```python
def runAction(self, event):
	

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

```

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

Cheers

---

<div class="post-metadata">

**Author:** ![jlandwerlen](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jlandwerlen](https://forum.inductiveautomation.com/u/jlandwerlen)\
**Post date:** [January 28, 2025, 2:10pm UTC](https://forum.inductiveautomation.com/t/custom-loading-screen/101479/3 "2025-01-28T14:10:53Z")

</div>

Instead of GIF just use a progress component,

> **[Perspective - Progress | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/components/perspective-components/perspective-display-palette/perspective-progress)**
>
> The Progress bar visually indicates the progress of a task.

Set the mode accordingly.
