GtkSpinButton

GtkSpinButton

Widget offering masked numerical entry and/or selection.

Object Hierarchy

GtkObject
`-- GtkWidget
       `-- GtkEditable
              `-- GtkEntry
                     `-- GtkSpinButton

Direct subclasses

None.

Description

A GtkSpinButton is a widget offering a displayed numerical value which can be incremented or decremented within a pre-set range by the user's clicking on one of two arrow buttons, or by using the Up and Down arrow keys.

The display area is a GtkEntry; the spinbutton object currently provides the only built-in means of masking input in GTK+. If you want to restrict the user to the values displayed rather than allowing keyboard input, call set_editable() from the spinbutton.

See also: GtkAdjustment, GtkCombo.

Constructor

GtkSpinButton ([ GtkAdjustment adjustment = NULL , [double climb_rate = 0.0 , [int digits = 0 ]]]);
-- Creates an editable rotating display of selectable numbers.

Methods

configure()
  Configures all elements of a spinbutton.
set_adjustment()
  Sets adjustment object.
get_adjustment()
  Retrieves adjustment object.
set_digits()
  Sets number of decimal places displayed.
get_value_as_float()
  Retrieves value as float.
get_value_as_int()
  Retrieves value as integer.
set_value()
  Sets value displayed in spinbutton entry field.
set_update_policy()
  Controls update policy.
set_numeric()
  Toggles the way non-numeric input is treated in display.
spin()
  Forces a spin.
set_wrap()
  Toggles whether the display wraps.
set_shadow_type()
  Controls appearance of spinbutton.
set_snap_to_ticks()
  Toggles whether input is aligned with increment.
update()
  Updates value according to settings.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.