The dimmer module lets you show a client-side dimmer, indicating that a process is currently running and the user interface is not responsive
Classes
Dimmer
Methods
|
Function |
Parameters |
Return Value |
Description |
|---|---|---|---|
|
Dimmer.__enter__ |
|
|
Enter the context, displaying the dimmer |
|
Dimmer.__exit__ |
exc_details: Exception type, instance and traceback |
|
Exit the context, removing the dimmer |
|
Dimmer.__init__ |
text: The text that should be displayed on screen.
|
|
Initialize a new |
Tip:
-
The rotating spinner graphic can be changed for a client installation by replacing the
DimmingSpinner.pngfile inside the clientResourcesfolder
Properties
|
Property |
Getter |
Setter |
Description |
|---|---|---|---|
|
Dimmer.text |
|
|
Allows you to read or set the text displayed in the Dimmer |
Examples
Dimmer rgba value visualization
Using a dimmer as a context manager
from ppms.dimmer import Dimmer
dimmer = Dimmer(text='Loading data', red=255, green=0, blue=255)
with dimmer:
# do something here
dimmer.text = 'Loaded 1 of 2 records'
# do some more stuff
# Dimming is automatically removed