Gtk.Scrollable

g GObject.GInterface GObject.GInterface Gtk.Scrollable Gtk.Scrollable GObject.GInterface->Gtk.Scrollable

Implementations:

Gtk.IconView, Gtk.Layout, Gtk.TextView, Gtk.ToolPalette, Gtk.TreeView, Gtk.Viewport

Methods

get_border ()

get_hadjustment ()

get_hscroll_policy ()

get_vadjustment ()

get_vscroll_policy ()

set_hadjustment (hadjustment)

set_hscroll_policy (policy)

set_vadjustment (vadjustment)

set_vscroll_policy (policy)

Virtual Methods

do_get_border ()

Properties

Name

Type

Flags

Short Description

hadjustment

Gtk.Adjustment

r/w/c

Horizontal adjustment that is shared between the scrollable widget and its controller

hscroll-policy

Gtk.ScrollablePolicy

r/w/en

How the size of the content should be determined

vadjustment

Gtk.Adjustment

r/w/c

Vertical adjustment that is shared between the scrollable widget and its controller

vscroll-policy

Gtk.ScrollablePolicy

r/w/en

How the size of the content should be determined

Signals

None

Fields

None

Class Details

class Gtk.Scrollable
Bases:

GObject.GInterface

Structure:

Gtk.ScrollableInterface

Gtk.Scrollable is an interface that is implemented by widgets with native scrolling ability.

To implement this interface you should override the Gtk.Scrollable :hadjustment and Gtk.Scrollable :vadjustment properties.

Creating a scrollable widget

All scrollable widgets should do the following.

get_border()[source]
Returns:

True if border has been set

border:

return location for the results

Return type:

(bool, border: Gtk.Border)

Returns the size of a non-scrolling border around the outside of the scrollable. An example for this would be treeview headers. GTK+ can use this information to display overlayed graphics, like the overshoot indication, at the right position.

New in version 3.16.

get_hadjustment()[source]
Returns:

horizontal Gtk.Adjustment.

Return type:

Gtk.Adjustment

Retrieves the Gtk.Adjustment used for horizontal scrolling.

New in version 3.0.

get_hscroll_policy()[source]
Returns:

The horizontal Gtk.ScrollablePolicy.

Return type:

Gtk.ScrollablePolicy

Gets the horizontal Gtk.ScrollablePolicy.

New in version 3.0.

get_vadjustment()[source]
Returns:

vertical Gtk.Adjustment.

Return type:

Gtk.Adjustment

Retrieves the Gtk.Adjustment used for vertical scrolling.

New in version 3.0.

get_vscroll_policy()[source]
Returns:

The vertical Gtk.ScrollablePolicy.

Return type:

Gtk.ScrollablePolicy

Gets the vertical Gtk.ScrollablePolicy.

New in version 3.0.

set_hadjustment(hadjustment)[source]
Parameters:

hadjustment (Gtk.Adjustment or None) – a Gtk.Adjustment

Sets the horizontal adjustment of the Gtk.Scrollable.

New in version 3.0.

set_hscroll_policy(policy)[source]
Parameters:

policy (Gtk.ScrollablePolicy) – the horizontal Gtk.ScrollablePolicy

Sets the Gtk.ScrollablePolicy to determine whether horizontal scrolling should start below the minimum width or below the natural width.

New in version 3.0.

set_vadjustment(vadjustment)[source]
Parameters:

vadjustment (Gtk.Adjustment or None) – a Gtk.Adjustment

Sets the vertical adjustment of the Gtk.Scrollable.

New in version 3.0.

set_vscroll_policy(policy)[source]
Parameters:

policy (Gtk.ScrollablePolicy) – the vertical Gtk.ScrollablePolicy

Sets the Gtk.ScrollablePolicy to determine whether vertical scrolling should start below the minimum height or below the natural height.

New in version 3.0.

do_get_border() virtual
Returns:

True if border has been set

border:

return location for the results

Return type:

(bool, border: Gtk.Border)

Returns the size of a non-scrolling border around the outside of the scrollable. An example for this would be treeview headers. GTK+ can use this information to display overlayed graphics, like the overshoot indication, at the right position.

New in version 3.16.

Property Details

Gtk.Scrollable.props.hadjustment
Name:

hadjustment

Type:

Gtk.Adjustment

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

Horizontal Gtk.Adjustment of the scrollable widget. This adjustment is shared between the scrollable widget and its parent.

New in version 3.0.

Gtk.Scrollable.props.hscroll_policy
Name:

hscroll-policy

Type:

Gtk.ScrollablePolicy

Default Value:

Gtk.ScrollablePolicy.MINIMUM

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Determines whether horizontal scrolling should start once the scrollable widget is allocated less than its minimum width or less than its natural width.

New in version 3.0.

Gtk.Scrollable.props.vadjustment
Name:

vadjustment

Type:

Gtk.Adjustment

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

Verical Gtk.Adjustment of the scrollable widget. This adjustment is shared between the scrollable widget and its parent.

New in version 3.0.

Gtk.Scrollable.props.vscroll_policy
Name:

vscroll-policy

Type:

Gtk.ScrollablePolicy

Default Value:

Gtk.ScrollablePolicy.MINIMUM

Flags:

READABLE, WRITABLE, EXPLICIT_NOTIFY

Determines whether vertical scrolling should start once the scrollable widget is allocated less than its minimum height or less than its natural height.

New in version 3.0.