Die Dokumentation ab Version 39.5.17 von PLANTA project finden Sie in der neuen PLANTA Online-Hilfe.

dimmer

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 DescriptionSorted ascending
Dimmer.__enter__(self)   Dimmer instance Enter the context, displaying the dimmer
Dimmer.__exit__(self, *exc_details) exc_details: Exception type, instance and traceback   Exit the context, removing the dimmer
Dimmer.__init__(self, text, red=255, green=255, blue=255, alpha=60, show_spinner=True) text: The text that should be displayed on screen.

red: The amount of red in the background.
green: The amount of green in the background.
blue: The amount of blue in the background.
alpha: The transparency of the background.
show_spinner: Controls if the rotating spinner graphic should be shown.

Info: red, green, blue and alpha range from 0 to 255
Dimmer instance Initialize a new Dimmer instance. The dimmer won't be shown until you enter its context

Tip:

  • The rotating spinner graphic can be changed for a client installation by replacing the DimmingSpinner.png file inside the client Resources folder

Properties

Property Getter Setter Description
Dimmer.text Checked Checked Allows you to read or set the text displayed in the Dimmer

Examples

Dimmer rgba value visualization

Empty tab

Example #1

dimmer_01.png

Example #2

dimmer_02.png

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
Topic attachments
I Attachment History Size Date Comment
Pngpng dimmer_01.png r1 9.3 K 2017-09-11 - 14:42  
Pngpng dimmer_02.png r1 46.1 K 2017-09-11 - 14:42  

         PLANTA project









 
  • Suche in Topic-Namen

  • Suche in Topic-Inhalten
This site is powered by the TWiki collaboration platform Powered by Perl