Gtk.CellRendererSpin

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gtk.CellRenderer Gtk.CellRenderer GObject.InitiallyUnowned->Gtk.CellRenderer GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.CellRendererText Gtk.CellRendererText Gtk.CellRenderer->Gtk.CellRendererText Gtk.CellRendererSpin Gtk.CellRendererSpin Gtk.CellRendererText->Gtk.CellRendererSpin

Subclasses:

None

Methods

Inherited:

Gtk.CellRendererText (2), Gtk.CellRenderer (25), GObject.Object (37)

Structs:

Gtk.CellRendererClass (1), GObject.ObjectClass (5)

class

new ()

Virtual Methods

Inherited:

Gtk.CellRendererText (1), Gtk.CellRenderer (12), GObject.Object (7)

Properties

Inherited:

Gtk.CellRendererText (48), Gtk.CellRenderer (16)

Name

Type

Flags

Short Description

adjustment

Gtk.Adjustment

r/w

The adjustment that holds the value of the spin button

climb-rate

float

r/w

The acceleration rate when you hold down a button

digits

int

r/w/en

The number of decimal places to display

Signals

Inherited:

Gtk.CellRendererText (1), Gtk.CellRenderer (2), GObject.Object (1)

Fields

Inherited:

Gtk.CellRendererText (1), Gtk.CellRenderer (2), GObject.Object (1)

Name

Type

Access

Description

parent

Gtk.CellRendererText

r

Class Details

class Gtk.CellRendererSpin(**kwargs)
Bases:

Gtk.CellRendererText

Abstract:

No

Structure:

Gtk.CellRendererSpinClass

Gtk.CellRendererSpin renders text in a cell like Gtk.CellRendererText from which it is derived. But while Gtk.CellRendererText offers a simple entry to edit the text, Gtk.CellRendererSpin offers a Gtk.SpinButton widget. Of course, that means that the text has to be parseable as a floating point number.

The range of the spinbutton is taken from the adjustment property of the cell renderer, which can be set explicitly or mapped to a column in the tree model, like all properties of cell renders. Gtk.CellRendererSpin also has properties for the Gtk.CellRendererSpin :climb-rate and the number of Gtk.CellRendererSpin :digits to display. Other Gtk.SpinButton properties can be set in a handler for the Gtk.CellRenderer ::editing-started signal.

The Gtk.CellRendererSpin cell renderer was added in GTK+ 2.10.

classmethod new()[source]
Returns:

a new Gtk.CellRendererSpin

Return type:

Gtk.CellRenderer

Creates a new Gtk.CellRendererSpin.

New in version 2.10.

Property Details

Gtk.CellRendererSpin.props.adjustment
Name:

adjustment

Type:

Gtk.Adjustment

Default Value:

None

Flags:

READABLE, WRITABLE

The adjustment that holds the value of the spinbutton. This must be non-None for the cell renderer to be editable.

New in version 2.10.

Gtk.CellRendererSpin.props.climb_rate
Name:

climb-rate

Type:

float

Default Value:

0.0

Flags:

READABLE, WRITABLE

The acceleration rate when you hold down a button.

New in version 2.10.

Gtk.CellRendererSpin.props.digits
Name:

digits

Type:

int

Default Value:

0

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

The number of decimal places to display.

New in version 2.10.