A Gtk::Bin with a decorative frame and optional label.
The Frame widget surrounds its single 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().
If the frame's label widget is a Gtk::Label, return the text in the label widget.
(The frame will have a Gtk::Label for the label widget if a non-0 argument was passed to new().)
Returns:
The text in the label, or 0 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.
void Gtk::Frame::get_label_align
(
float&
xalign,
float&
yalign
)
const
Retrieves the X and Y alignment of the frame's label.
Set the label to appear in the top edge of the frame.
Label alignment defaults to the upper left corner of the frame.
void Gtk::Frame::set_label_align
(
AlignmentEnum
xalign,
AlignmentEnum
yalign = Gtk::ALIGN_CENTER
)
void Gtk::Frame::set_label_align
(
float
xalign = 0.0,
float
yalign = 0.5
)
Set the alignment of the Frame's label.
Parameters:
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. The default value for a newly created Frame is 0.0.