Package: gtk

Class gtk-scrollbar


gtk-range, gtk-widget, g-initially-unowned, gtk-buildable, gtk-orientable, g-object, common-lisp:standard-object, common-lisp:t

Documented Subclasses

Direct Slots



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

The position of the thumb in a scrollbar is controlled by the scroll adjustments. See gtk-adjustment for the properties in an adjustment - for gtk-scrollbar, the value property represents the position of the scrollbar, which must be between the lower property and upper - page-size. The page-size property represents the size of the visible scrollable area. The step-increment and page-increment properties are used when the user asks to step down, using the small stepper arrows, or page down, using for example the PageDown key.

CSS nodes

 ╰── contents
     ├── [button.up]
     ├── [button.down]
     ├── trough
     │   ╰── slider
     ├── [button.up]
     ╰── [button.down]    
gtk-scrollbar has a main CSS node with name scrollbar and a subnode for its contents, with subnodes named trough and slider.

The main node gets the style class .fine-tune added when the scrollbar is in "fine-tuning" mode.

If steppers are enabled, they are represented by up to four additional subnodes with name button. These get the style classes .up and .down to indicate in which direction they are moving.

Other style classes that may be added to scrollbars inside gtk-scrolled-window include the positional classes .left, .right, .top, .bottom and style classes related to overlay scrolling .overlay-indicator, .dragging, .hovering.

Style Property Details

The fixed-slider-length style property of type :boolean (Read)
Don't change slider size, just lock it to the minimum length.
Default value: nil
The has-backward-stepper style property of type :boolean (Read)
Display the standard backward arrow button.
Default value: true
The has-forward-stepper style property of type :boolean (Read)
Display the standard forward arrow button.
Default value: true
The has-secondary-backward-stepper style property of type :boolean (Read)
Display a second backward arrow button on the opposite end of the scrollbar.
Default value: nil
The has-secondary-forward-stepper style property of type :boolean (Read)
Display a second forward arrow button on the opposite end of the scrollbar.
Default value: nil
The min-slider-length style property of type :int (Read)
Minimum length of scrollbar slider.
Warning: min-slider-length has been deprecated since version 3.20 and should not be used in newly-written code. Use min-height/min-width CSS properties on the slider element instead. The value of this style property is ignored.
Allowed values: >= 0
Default value: 21

Inherited Slot Access Functions

See also