Créer  Editer  FrontPage  Index  Chercher  Changements  History  RSS  Login

Gtk::CellRendererSpin

class Gtk::CellRendererSpin

A 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 climb rate and the number of digits to display. Other Gtk::SpinButton properties can be set in a handler for the "start-editing" signal.

Since 2.10

Class Methods

Gtk::CellRendererSpin.new
Creates a new Gtk::CellRendererSpin. Since 2.10
adjustment
Gets the adjustment that holds the value of the spinbutton. Since 2.10
  • Returns: The adjustment that holds the value of the spinbutton. (Gtk::Adjustment)
adjustment=(adjustment)
Sets the adjustment that holds the value of the spinbutton. Since 2.10
  • adjustment: The adjustment that holds the value of the spinbutton. (Gtk::Adjustment)
  • Returns: adjustment
set_adjustment(adjustment)
Same as adjustment=. Since 2.10
  • adjustment: The adjustment that holds the value of the spinbutton.(Gtk::Adjustment)
  • Returns: self
climb_rate
Gets the acceleration rate when you hold down a button.
  • Returns: The acceleration rate when you hold down a button
climb_rate=(climb_rate)
Sets the acceleration rate when you hold down a button.
  • climb_rate: The acceleration rate when you hold down a button
  • Returns: climb_rate
set_climb_rate(climb_rate)
Same as climb_rate=.
  • climb_rate: The acceleration rate when you hold down a button
  • Returns: self
digits
Gets the number of decimal places to display.
  • Returns: The number of decimal places to display
digits=(digits)
Sets the number of decimal places to display.
  • digits: The number of decimal places to display
  • Returns: digits
set_digits(digits)
Same as digits=.
  • digits: The number of decimal places to display
  • Returns: self

Properties

adjustment: Gtk::Adjustment (Read/Write)
The adjustment that holds the value of the spinbutton. This must be non-nil for the cell renderer to be editable.
climb-rate: Float (Read/Write)
The acceleration rate when you hold down a button
  • Allowed values: >= 0
  • Default value: 0
digits: Integer (Read/Write)
The number of decimal places to display
  • Allowed values: <= 20
  • Default value: 0

ChangeLog

  • 2007-02-03: Modified. Add properties. - Masao?
  • 2006-07-16: new widget binded and documented for 2.10. - gc?

- gc?

Dernière modification:2011/06/27 22:27:32
Mots clef:
Références:[Gtk::CellRendererSpin]