A bin with a decorative frame and optional label
Class GtkFrame( [label] )
label | the text to use as the label of the frame |
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().
Methods | |
get_label | If the frame's label widget is a GtkLabel, returns the text in the label widget, else return nil |
get_label_align | Retrieves the X and Y alignment of the frame's label. |
get_label_widget | Retrieves the label widget for the frame. |
get_shadow_type | Retrieves the shadow type of the frame. |
set_label | Sets the text of the label. If label is nil, the current label is removed. |
set_label_align | Sets the alignment of the frame widget's label. |
set_label_widget | Sets the label widget for the frame. |
set_shadow_type | Sets the shadow type for frame. |
If the frame's label widget is a GtkLabel, returns the text in the label widget, else return nil
GtkFrame.get_label()
Return | the text in the label, or nil if there was no label widget or the lable widget was not a GtkLabel. |
(The frame will have a GtkLabel for the label widget if a non-NULL argument was passed to gtk_frame_new().)
Retrieves the X and Y alignment of the frame's label.
GtkFrame.get_label_align()
Return | [ xalign, yalign ] |
Retrieves the label widget for the frame.
GtkFrame.get_label_widget()
Return | the label widget, or nil if there is none. |
Retrieves the shadow type of the frame.
GtkFrame.get_shadow_type()
Return | (GtkShadowType) the current shadow type of the frame. |
Sets the text of the label. If label is nil, the current label is removed.
GtkFrame.set_label( the )
the | text to use as the label of the frame (or nil) |
Sets the alignment of the frame widget's label.
GtkFrame.set_label_align( xalign, yalign )
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. If the values are exactly 0.0 or 1.0 the gap in the frame won't be painted because the label will be completely above or below the frame. |
The default values for a newly created frame are 0.0 and 0.5.
Sets the label widget for the frame.
GtkFrame.set_label_widget( label_widget )
label_widget | the new label widget |
This is the widget that will appear embedded in the top edge of the frame as a title.
Sets the shadow type for frame.
GtkFrame.set_shadow_type( type )
type | (GtkShadowType) the new GtkShadowType |