|
class gtk.Frame(gtk.Bin): |
+--gobject.GObject +-- gtk.Object +-- gtk.Widget +-- gtk.Container +-- gtk.Bin +-- gtk.Frame
|
The gtk.Frame
widget is a
gtk.Bin
that
surrounds its child with a decorative frame and an optional label. If
present, the label is drawn in a gap in the top side of the frame. The
position of the label can be controlled with set_label_align
().
gtk.Frame(label
=None)
| a string to use as the label text or None if no label is required. |
Returns : | a new frame widget |
Creates a new gtk.Frame
widget with
the label text specified by label
. If
label
is None
no label is
created.
def set_label(label
)
| a string to be used as the label text |
The set_label
() method sets the text of
the label as specified by label
. If
label
is None
the current label is
removed.
def get_label()
Returns : | the text in the label, or
None if there is no label widget or the label widget is
not a gtk.Label . |
The get_label
() method returns the text
in the label widget. If there is no label widget or the label widget is not
a gtk.Label
the
method returns None
.
def set_label_widget(label_widget
)
| the new label widget |
The set_label_widget
() method set the
label widget (usually to something other than a gtk.Label
widget) for
the frame. This widget will appear embedded in the top edge of the frame as
a title.
def get_label_widget()
Returns : | the label widget, or None if
there is no label widget. |
The get_label_widget
() method retrieves
the label widget for the frame. See set_label_widget
().
def set_label_align(xalign
, yalign
)
| the horizontal alignment of the label widget along the top edge of the frame (in the range of 0.0 to 1.0) |
| the vertical alignment of the decoration with respect to the label widget (in the range 0.0 to 1.0) |
The set_label_align
() method sets the
alignment of the frame's label widget and decoration (defaults are 0.0 and
0.5) as specified by xalign
and
yalign
. The xalign
value
specifies the fraction of free horizontal space that is allocated to the
left of the label widget. The yalign
value specifies
the fraction of label widget height above the decoration.
def get_label_align()
Returns : | a tuple containing the x and y alignments of the frame's label widget |
The get_label_align
() method returns a
tuple containing the X and Y alignment of the frame's label widget and
decoration. See the set_label_align
()
method.
def set_shadow_type(type
)
| a shadow type:
gtk.SHADOW_NONE , gtk.SHADOW_IN ,
gtk.SHADOW_OUT , gtk.SHADOW_ETCHED_IN ,
gtk.SHADOW_ETCHED_OUT |
The set_shadow_type
() method sets the
frame's shadow type to the value of type
. The type
must be one of: gtk.SHADOW_NONE
,
gtk.SHADOW_IN
, gtk.SHADOW_OUT
,
gtk.SHADOW_ETCHED_IN
,
gtk.SHADOW_ETCHED_OUT
def get_shadow_type()
Returns : | the current shadow type of the frame. |
The get_shadow_type() method retrieves the shadow type of the
frame; one of: gtk.SHADOW_NONE
,
gtk.SHADOW_IN
, gtk.SHADOW_OUT
,
gtk.SHADOW_ETCHED_IN
,
gtk.SHADOW_ETCHED_OUT
. See set_shadow_type
().
© manpagez.com 2000-2024 Individual documents may contain additional copyright information.