Gtk.Scrollbar

const Gtk = imports.gi.Gtk;

let scrollbar = new Gtk.Scrollbar();
  

The Gtk.Scrollbar widget is a horizontal or vertical scrollbar, depending on the value of the Gtk.orientation property.

The position of the thumb in a scrollbar is controlled by the scroll adjustments. See Gtk.Adjustment for the fields in an adjustment - for Gtk.Scrollbar, the Gtk.Adjustment:value field represents the position of the scrollbar, which must be between the Gtk.Adjustment:lower field and Gtk.Adjustment:upper - Gtk.Adjustment:page-size. The Gtk.Adjustment:page-size field represents the size of the visible scrollable area. The Gtk.Adjustment:step-increment and Gtk.Adjustment:page-increment fields are properties when the user asks to step down (using the small stepper arrows) or page down (using for example the <keycap>PageDown</keycap> key).

Hierarchy

  • GObject.Object
    • GObject.InitiallyUnowned
      • Gtk.Widget
        • Gtk.Range
          • Gtk.Scrollbar