Gtk::HScale
class Gtk::HScale
The Gtk::HScale widget is used to allow the user to select a value using a horizontal slider.
The position to show the current value, and the number of decimal places shown can be set using the parent Gtk::Scale class's methods.
Class Methods
Gtk::HScale.new(adj)
-
Creates a new Gtk::HScale.
- adj: the Gtk::Adjustment which sets the range of the scale.
- Returns: a new Gtk::HScale.
Gtk::HScale.new(min, max, step)
-
Creates a new horizontal scale widget that lets the user input a number between min and max (including min and max) with the increment step. step must be nonzero; it's the distance the slider moves when using the arrow keys to adjust the scale value.
- min: minimum value(Float)
- max: maximum value(Float)
- step: step increment (tick size) used with keyboard shortcuts(Float)
- Returns: a new Gtk::HScale
Example:
Gtk::HScale.new(0.0, 5.0, 0.1)
This would set a new scale that starts at 0.0, goes up to 5.0, and goes in incremental steps of + or - 0.1.
Instance Methods
ref_accessible
- See Atk::Implementor#ref_accessible.
add_child
- See Gtk::Buildable#add_child.
construct_child
- See Gtk::Buildable#construct_child.
get_internal_child
- See Gtk::Buildable#get_internal_child.
name
- See Gtk::Buildable#name.
name=
- See Gtk::Buildable#name=.
set_buildable_property
- See Gtk::Buildable#set_buildable_property.
set_name
- See Gtk::Buildable#set_name.
builder_name
- See Gtk::Buildable#builder_name.
builder_name=
- See Gtk::Buildable#builder_name=.
set_builder_name
- See Gtk::Buildable#set_builder_name.
Keyword(s):
References:[tut-gtk2-numtxt] [api-gtk-index] [Gtk::HScale] [Ruby/GTK] [index-ruby-gtk2] [Gtk::Adjustment] [ruby-gtk-object-hierarchy] [Gtk::Scale]