gtk.Viewport — a widget displaying a portion of a larger widget.
class gtk.Viewport(gtk.Bin): |
+-- gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.Viewport
|
gobject.GObject Signal Prototypes
gtk.Container Signal Prototypes
| "set-scroll-adjustments" | def callback( |
A gtk.Viewport
widget provides a view into a portion of a larger widget. A gtk.Viewport is
usually used to provide adjustment capability for a widget to be used in a
gtk.ScrolledWindow.
For example, a label widget doesn't have any adjustments (does not support
the "set-scroll-adjustments" signal) and would need a viewport when added to
a gtk.ScrolledWindow
to make the scrollbars functional. See the gtk.ScrolledWindow.add_with_viewport()
method for more information.
gtk.Viewport(hadjustment=None, vadjustment=None)hadjustment : | a horizontal adjustment. |
vadjustment : | a vertical adjustment. |
| Returns : | a new gtk.Viewport
widget |
Creates a new gtk.Viewport with
the horizontal and vertical adjustments specified by
hadjustment and vadjustment
respectively. If hadjustment or
vadjustment is None a new
adjustment will be created.
def get_hadjustment()| Returns : | the horizontal adjustment |
The get_hadjustment() method returns
the value of the "hadjustment" property that contains the horizontal gtk.Adjustment
of the viewport.
def get_vadjustment()| Returns : | the vertical adjustment |
The get_vadjustment() method returns
the value of the "vadjustment" property that contains the vertical gtk.Adjustment
of the viewport.
def set_hadjustment(adjustment)adjustment : | a gtk.Adjustment. |
The set_hadjustment() method sets the
"hadjustment" property to the value of adjustment
that becomes the horizontal adjustment of the viewport.
def set_vadjustment(adjustment)adjustment : | a gtk.Adjustment. |
The set_vadjustment() method sets the
"vadjustment" property to the value of adjustment
that becomes the vertical adjustment of the viewport.
def set_shadow_type(type)type : | the new shadow type. |
The set_shadow_type() method sets the
"shadow-type" property to the value of type. The
value of type must be one of:
gtk.SHADOW_NONEgtk.SHADOW_INgtk.SHADOW_OUTgtk.SHADOW_ETCHED_INgtk.SHADOW_ETCHED_OUT def get_shadow_type()| Returns : | the shadow type |
The get_shadow_type() method returns
the value of the "shadow-type" property that contains the shadow type of the
gtk.Viewport. See
the set_shadow_type()
method for more information.
def callback(viewport, hadjustment, vadjustment, user_param1, ...)viewport : | the viewport that received the signal |
hadjustment : | the horizontal gtk.Adjustment |
vadjustment : | the vertical gtk.Adjustment |
user_param1 : | the first user parameter (if any) specified
with the connect()
method |
... : | additional user parameters (if any) |
The "set-scroll-adjustments" signal is emitted when one or both
of the horizontal and vertical gtk.Adjustment
objects is changed.