Skip to content

Gtk.CellRendererSpinner

class — extends CellRenderer

:::warning Deprecated since 4.10 This API is deprecated. :::

Renders a spinning animation in a cell

GtkCellRendererSpinner renders a spinning animation in a cell, very similar to GtkSpinner. It can often be used as an alternative to a GtkCellRendererProgress for displaying indefinite activity, instead of actual progress.

To start the animation in a cell, set the GtkCellRendererSpinner:active property to True and increment the GtkCellRendererSpinner:pulse property at regular intervals. The usual way to set the cell renderer properties for each cell is to bind them to columns in your tree model using e.g. TreeViewColumn.add_attribute.

Constructors

new

@classmethod
def new(cls) -> CellRenderer

:::warning Deprecated since 4.10 This API is deprecated. :::

Returns a new cell renderer which will show a spinner to indicate activity.

Properties

active

active: bool  # read/write

Whether the spinner is active (ie. shown) in the cell

pulse

pulse: int  # read/write

Pulse of the spinner. Increment this value to draw the next frame of the spinner animation. Usually, you would update this value in a timeout.

By default, the GtkSpinner widget draws one full cycle of the animation, consisting of 12 frames, in 750 milliseconds.

size

size: IconSize | int  # read/write

The GtkIconSize value that specifies the size of the rendered spinner.