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.Scrollableis an interface that is implemented by widgets with native scrolling ability.- To implement this interface you should override the - Gtk.Scrollable- :hadjustmentand- Gtk.Scrollable- :vadjustmentproperties.- Creating a scrollable widget
 - All scrollable widgets should do the following. - When a parent widget sets the scrollable child widget’s adjustments,
the widget should populate the adjustments’
Gtk.Adjustment:lower,Gtk.Adjustment:upper,Gtk.Adjustment:step-increment,Gtk.Adjustment:page-incrementandGtk.Adjustment:page-sizeproperties and connect to theGtk.Adjustment::value-changedsignal.
- Because its preferred size is the size for a fully expanded widget,
the scrollable widget must be able to cope with underallocations.
This means that it must accept any value passed to its
Gtk.Widget.do_size_allocate() function.
- When the parent allocates space to the scrollable child widget, the widget should update the adjustments’ properties with new values.
- When any of the adjustments emits the Gtk.Adjustment::value-changedsignal, the scrollable widget should scroll its contents.
 - 
get_border()[source]¶
- Returns: - Trueif 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.Adjustmentused 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.Adjustmentused 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.Adjustmentor- 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.ScrollablePolicyto 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.Adjustmentor- 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.ScrollablePolicyto 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: - Trueif 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.Adjustmentof 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.Adjustmentof 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.