CellRendererSpin

Renders a spin button in a cell

gtk.cell_renderer_spin.CellRendererSpin renders text in a cell like gtk.cell_renderer_text.CellRendererText from which it is derived. But while gtk.cell_renderer_text.CellRendererText offers a simple entry to edit the text, gtk.cell_renderer_spin.CellRendererSpin offers a gtk.spin_button.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.cell_renderer_spin.CellRendererSpin also has properties for the GtkCellRendererSpin:climb-rate and the number of GtkCellRendererSpin:digits to display. Other gtk.spin_button.SpinButton properties can be set in a handler for the GtkCellRenderer::editing-started signal.

More...
class CellRendererSpin : CellRendererText {}

Constructors

this
this()

Creates a new gtk.cell_renderer_spin.CellRendererSpin.

Inherited Members

From CellRendererText

setFixedHeightFromFont
void setFixedHeightFromFont(int numberOfRows)

Sets the height of a renderer to explicitly be determined by the “font” and “y_pad” property set on it. Further changes in these properties do not affect the height, so they must be accompanied by a subsequent call to this function. Using this function is inflexible, and should really only be used if calculating the size of a cell is too slow (ie, a massive number of cells displayed). If number_of_rows is -1, then the fixed height is unset, and the height is determined by the properties again.

connectEdited
ulong connectEdited(T callback, Flag!"After" after)

Connect to Edited signal.

Detailed Description

Deprecated: List views use widgets to display their contents. You should use gtk.spin_button.SpinButton instead