ProgressSpinner

class vanilla.ProgressSpinner(posSize, displayWhenStopped=False, sizeStyle='regular')

An animated, spinning progress indicator.:

from vanilla import *

class ProgressSpinnerDemo(object):

    def __init__(self):
        self.w = Window((80, 52))
        self.w.spinner = ProgressSpinner((24, 10, 32, 32),
                                displayWhenStopped=True)
        self.w.spinner.start()
        self.w.open()

ProgressSpinnerDemo()

posSize Tuple of form (left, top, width, height) representing the position and size of the spinner. The size of the spinner sould match the appropriate value for the given sizeStyle.

Standard Dimensions
Regular W 32 H 32
Small W 16 H 16

displayWhenStopped Boolean representing if the spiiner should be displayed when it is not spinning.

sizeStyle A string representing the desired size style of the spinner. The options are:

“regular”
“small”
getNSProgressIndicator()

Return the NSProgressIndicator that this object wraps.

start()

Start the animation.

stop()

Stop the animation.

enable(onOff)

Enable or disable the object. onOff should be a boolean.

getPosSize()

The position and size of the object as a tuple of form (left, top, width, height).

isVisible()

Return a bool indicting if the object is visible or not.

move(x, y)

Move the object by x units and y units.

resize(width, height)

Change the size of the object to width and height.

setPosSize(posSize)

Set the postion and size of the object.

posSize A tuple of form (left, top, width, height).

show(onOff)

Show or hide the object.

onOff A boolean value representing if the object should be shown or not.