Chapter 5. Range Widgets

## Chapter 5. Range Widgets

`Gtk::Scale` and `Gtk::Scrollbar` both inherit from `Gtk::Range` and share much functionality. They contain a "trough" and a "slider" (sometimes called a "thumbwheel" in other GUI environments). Dragging the slider with the pointer moves it within the trough, while clicking in the trough advances the slider towards the location of the click, either completely, or by a designated amount, depending on which mouse button is used. This should be familiar scrollbar behaviour.

As will be explained in the Adjustment section, all Range widgets are associated with a `Adjustment` object. To change the lower, upper, and current values used by the widget you need to use the methods of its `Adjustment`, which you can get with the `get_adjustment()` method. The `Range` widgets' default constructors create an `Adjustment` automatically, or you can specify an existing `Adjustment`, maybe to share it with another widget. See the Adjustments section for further details

Reference

## Scrollbar Widgets

These are standard scrollbars. They should be used only to scroll another widget, such as, a `Gtk::Entry`, or a `Gtk::Viewport`, though it's usually easier to use the `Gtk::ScrolledWindow` widget in most cases.

There are horizontal and vertical scrollbar classes - `Gtk::HScrollbar` and `Gtk::VScrollbar`.

Reference

RadioButton |  | Scale Widgets