# ScrolledWindow (Python)

Marta Maria Casetti
mmcasetti@gmail.com 2012
Engade barras de desprazamento no seu widget fillo

# ScrolledWindow

Unha imaxe dunha xanela con desprazamento.

# Código usado para xerar este exemplo

# Métodos útiles para o widget ScrollWindow

`set_policy(hscrollbar_policy, vscrollbar_policy)` where each of the arguments is one of `Gtk.Policy.AUTOMATIC, Gtk.Policy.ALWAYS, Gtk.Policy.NEVER` regulates whether the horizontal and vertical scrollbars should appear: with `AUTOMATIC` they appear only if needed, `ALWAYS` and `NEVER` are self-explanatory.

`add_with_viewport(widget)` is used to add the Gtk.Widget `widget` without native scrolling capabilities inside the window.

`set_placement(window_placement)` sets the placement of the contents with respect to the scrollbars for the scrolled window. The options for the argument are `Gtk.CornerType.TOP_LEFT` (default: the scrollbars are on the bottom and on the right of the window), `Gtk.CornerType.TOP_RIGHT, Gtk.CornerType.BOTTOM_LEFT, Gtk.CornerType.BOTTOM_RIGHT`.

`set_hadjustment(adjustment)` and `set_vadjustment(adjustment)` set the Gtk.Adjustment `adjustment`. This is the representation of a value with a lower and upper bound, together with step and page increments, and a page size, and it is constructed as `Gtk.Adjustment(value, lower, upper, step_increment, page_increment, page_size)` where the fields are of type `float`. (Note that `step_increment` is not used in this case, it can be set to `0`.)

# API References

Neste exemplo empregaremos o seguinte:

GtkScrolledWindow

Enumeracións estándar

GtkImage