A bin with a decorative frame and optional label
The frame widget is a 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
gtk-frame-set-label-align
.
Derives from
<gtk-bin>
.This class defines the following slots:
label
- Text of the frame's label
label-xalign
- The horizontal alignment of the label
label-yalign
- The vertical alignment of the label
shadow
- Deprecated property, use shadow_type instead
shadow-type
- Appearance of the frame border
label-widget
- A widget to display in place of the usual frame label
mchars
) ⇒ (ret <gtk-widget>
)Creates a new
<gtk-frame>
, with optional label label. If label is ‘#f
’, the label is omitted.
- label
- the text to use as the label of the frame
- ret
- a new
<gtk-frame>
widget
<gtk-frame>
) (label mchars
)Sets the text of the label. If label is ‘
#f
’, the current label is removed.
- frame
- a
<gtk-frame>
- label
- the text to use as the label of the frame
<gtk-frame>
) (label_widget <gtk-widget>
)Sets the label widget for the frame. This is the widget that will appear embedded in the top edge of the frame as a title.
- frame
- a
<gtk-frame>
- label-widget
- the new label widget
<gtk-frame>
) (xalign float
) (yalign float
)Sets the alignment of the frame widget's label. The default values for a newly created frame are 0.0 and 0.5.
- frame
- a
<gtk-frame>
- xalign
- The position of the label along the top edge of the widget. A value of 0.0 represents left alignment; 1.0 represents right alignment.
- yalign
- The y alignment of the label. A value of 0.0 aligns under the frame; 1.0 aligns above the frame.
<gtk-frame>
) (type <gtk-shadow-type>
)Sets the shadow type for frame.
- frame
- a
<gtk-frame>
- type
- the new
<gtk-shadow-type>
<gtk-frame>
) ⇒ (ret mchars
)If the frame's label widget is a
<gtk-label>
, returns the text in the label widget. (The frame will have a<gtk-label>
for the label widget if a non-‘#f
’ argument was passed togtk-frame-new
.)
- frame
- a
<gtk-frame>
- ret
- the text in the label, or ‘
#f
’ if there was no label widget or the lable widget was not a<gtk-label>
. This string is owned by GTK+ and must not be modified or freed.
<gtk-frame>
) ⇒ (xalign float
) (yalign float
)Retrieves the X and Y alignment of the frame's label. See
gtk-frame-set-label-align
.
- frame
- a
<gtk-frame>
- xalign
- location to store X alignment of frame's label, or ‘
#f
’- yalign
- location to store X alignment of frame's label, or ‘
#f
’