Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Create a button whose label changes while its action is being performed
| ResourceFunction["ButtonWithStatus"][{label1,label2},action] represents a button that is labeled with label1 and evaluates action whenever it is clicked and is labeled with label2 while action is being performed. | 
This button will display "Please wait" for two seconds when clicked:
| In[1]:= | ![ResourceFunction["ButtonWithStatus"][{"Click here", "Please wait"}, Pause[2]]](https://www.wolframcloud.com/obj/resourcesystem/images/150/150cab40-ba73-4aeb-b8dd-eb1f916d6d6f/41b8aab0bc0ebb64.png) | 
| Out[1]= |  | 
When used with only one label, the button will display a progress indicator during the action:
| In[2]:= | ![ResourceFunction["ButtonWithStatus"]["Click here", Pause[2]]](https://www.wolframcloud.com/obj/resourcesystem/images/150/150cab40-ba73-4aeb-b8dd-eb1f916d6d6f/10e761c6249d41a1.png) | 
| Out[2]= |  | 
This work is licensed under a Creative Commons Attribution 4.0 International License