Create  Edit  FrontPage  Index  Search  Changes  History  RSS  Login


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
Creates a new Gtk::HScale., 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:, 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.

Last modified:2016/05/08 03:12:29
References:[Gtk::HScale] [Gtk::Adjustment] [tut-gtk2-numtxt] [Ruby/GTK] [ruby-gtk-object-hierarchy] [api-gtk-index] [Gtk::Scale] [index-ruby-gtk2]