Gtk.Scrollbar¶
Example¶
- Subclasses:
Methods¶
- Inherited:
Gtk.Range (28), Gtk.Widget (278), GObject.Object (37), Gtk.Buildable (10), Gtk.Orientable (2)
- Structs:
class |
|
Virtual Methods¶
- Inherited:
Gtk.Range (6), Gtk.Widget (82), GObject.Object (7), Gtk.Buildable (10)
Properties¶
- Inherited:
Style Properties¶
- Inherited:
Name |
Type |
Default |
Flags |
Short Description |
---|---|---|---|---|
|
r |
Don’t change slider size, just lock it to the minimum length |
||
|
r |
|
||
|
r |
|
||
|
r |
|
||
|
r |
|
||
|
|
d/r |
Minimum length of scrollbar slider |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
range |
r |
Class Details¶
- class Gtk.Scrollbar(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
The
Gtk.Scrollbar
widget is a horizontal or vertical scrollbar, depending on the value of theGtk.Orientable
:orientation
property.Its position and movement are controlled by the adjustment that is passed to or created by
Gtk.Scrollbar.new
(). SeeGtk.Adjustment
for more details. TheGtk.Adjustment
:value
field sets the position of the thumb and must be betweenGtk.Adjustment
:lower
andGtk.Adjustment
:upper
-Gtk.Adjustment
:page-size
. TheGtk.Adjustment
:page-size
represents the size of the visible scrollable area. The fieldsGtk.Adjustment
:step-increment
andGtk.Adjustment
:page-increment
fields are added to or subtracted from theGtk.Adjustment
:value
when the user asks to move by a step (using e.g. the cursor arrow keys or, if present, the stepper buttons) or by a page (using e.g. the Page Down/Up keys).- CSS nodes
scrollbar[.fine-tune] ╰── 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.ScrolledWindow
include the positional classes (.left, .right, .top, .bottom) and style classes related to overlay scrolling (.overlay-indicator, .dragging, .hovering).- classmethod new(orientation, adjustment)[source]¶
- Parameters:
orientation (
Gtk.Orientation
) – the scrollbar’s orientation.adjustment (
Gtk.Adjustment
orNone
) – theGtk.Adjustment
to use, orNone
to create a new adjustment.
- Returns:
the new
Gtk.Scrollbar
.- Return type:
Creates a new scrollbar with the given orientation.
New in version 3.0.