Gtk.Scrollable¶
- Implementations:
Gtk.IconView,Gtk.Layout,Gtk.TextView,Gtk.ToolPalette,Gtk.TreeView,Gtk.Viewport
Methods¶
|
|
|
|
|
|
|
|
|
Virtual Methods¶
Properties¶
Name |
Type |
Flags |
Short Description |
|---|---|---|---|
r/w/c |
Horizontal adjustment that is shared between the scrollable widget and its controller |
||
r/w/en |
How the size of the content should be determined |
||
r/w/c |
Vertical adjustment that is shared between the scrollable widget and its controller |
||
r/w/en |
How the size of the content should be determined |
Signals¶
None
Fields¶
None
Class Details¶
- class Gtk.Scrollable¶
- Bases:
- Structure:
Gtk.Scrollableis an interface that is implemented by widgets with native scrolling ability.To implement this interface you should override the
Gtk.Scrollable:hadjustmentandGtk.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:
Retrieves the
Gtk.Adjustmentused for horizontal scrolling.New in version 3.0.
- get_hscroll_policy()[source]¶
- Returns:
The horizontal
Gtk.ScrollablePolicy.- Return type:
Gets the horizontal
Gtk.ScrollablePolicy.New in version 3.0.
- get_vadjustment()[source]¶
- Returns:
vertical
Gtk.Adjustment.- Return type:
Retrieves the
Gtk.Adjustmentused for vertical scrolling.New in version 3.0.
- get_vscroll_policy()[source]¶
- Returns:
The vertical
Gtk.ScrollablePolicy.- Return type:
Gets the vertical
Gtk.ScrollablePolicy.New in version 3.0.
- set_hadjustment(hadjustment)[source]¶
- Parameters:
hadjustment (
Gtk.AdjustmentorNone) – aGtk.Adjustment
Sets the horizontal adjustment of the
Gtk.Scrollable.New in version 3.0.
- set_hscroll_policy(policy)[source]¶
- Parameters:
policy (
Gtk.ScrollablePolicy) – the horizontalGtk.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.AdjustmentorNone) – aGtk.Adjustment
Sets the vertical adjustment of the
Gtk.Scrollable.New in version 3.0.
- set_vscroll_policy(policy)[source]¶
- Parameters:
policy (
Gtk.ScrollablePolicy) – the verticalGtk.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:
- Default Value:
- Flags:
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:
- Default Value:
- Flags:
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:
- Default Value:
- Flags:
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:
- Default Value:
- Flags:
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.