manpagez: man pages & more
html files: pygtk
Home | html | info | man
gtk.Frame — a bin with a decorative frame and optional label.

Synopsis

class gtk.Frame(gtk.Bin):
    gtk.Frame(label=None)
def set_label(label)
def get_label()
def set_label_widget(label_widget)
def get_label_widget()
def set_label_align(xalign, yalign)
def get_label_align()
def set_shadow_type(type)
def get_shadow_type()

Ancestry

+-- gobject.GObject
  +-- gtk.Object
    +-- gtk.Widget
      +-- gtk.Container
        +-- gtk.Bin
          +-- gtk.Frame

Implemented Interfaces

gtk.Frame implements gtk.Buildable

gtk.Frame Properties

gtk.Object Properties

gtk.Widget Properties

gtk.Container Properties

"label"Read-WriteThe text of the frame's label
"label-widget"Read-WriteThe widget to display in place of the usual frame label.
"label-xalign"Read-WriteThe horizontal alignment of the label widget in the range of 0.0 to 1.0
"label-yalign"Read-WriteThe vertical alignment of the decoration within the label widget height in the range of 0.0 to 1.0
"shadow-type"Read-WriteThe style of the frame's border; one of: gtk.SHADOW_NONE, gtk.SHADOW_IN, gtk.SHADOW_OUT, gtk.SHADOW_ETCHED_IN, gtk.SHADOW_ETCHED_OUT

gtk.Frame Style Properties

gtk.Widget Style Properties

gtk.Frame Signal Prototypes

gobject.GObject Signal Prototypes

gtk.Object Signal Prototypes

gtk.Widget Signal Prototypes

gtk.Container Signal Prototypes

Description

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().

Constructor

    gtk.Frame(label=None)

label :

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.

Methods

gtk.Frame.set_label

    def set_label(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.

gtk.Frame.get_label

    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.

gtk.Frame.set_label_widget

    def set_label_widget(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.

gtk.Frame.get_label_widget

    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().

gtk.Frame.set_label_align

    def set_label_align(xalign, yalign)

xalign :

the horizontal alignment of the label widget along the top edge of the frame (in the range of 0.0 to 1.0)

yalign :

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.

gtk.Frame.get_label_align

    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.

gtk.Frame.set_shadow_type

    def set_shadow_type(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

gtk.Frame.get_shadow_type

    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.