How to create a "Busy Dialog"?



Hi all,

i have a Panel Control with Items that have a “onclick” attribute. That works great, when clicking on them the action is executed. However, this action takes 5-10 seconds to complete.
Now my question: While the action is performed, can i “fire up” a Busy Dialog indicating that Kodi is busy? In my imagination it would be perfect if i just could set a Property like “isBusy” and clear it when the action is done, using a try-catch-finally block where finally ensures the Busy Dialog is unset again.
But currently i don’t know how to spawn this “Spinner Wheel”. I tried to look in the Wiki and searched the forum here.
At best someone has an code example, i’ll get along with it, thank you! Wink