Frame
-
class Frame(**properties: Any)
Superclasses: Widget
, InitiallyUnowned
, Object
Implemented Interfaces: Accessible
, Buildable
, ConstraintTarget
- Constructors:
Frame(**properties)
new(label:str=None) -> Gtk.Widget
Constructors
-
class Frame
-
classmethod new(label: str | None = None) → Widget
Creates a new GtkFrame
, with optional label label
.
If label
is None
, the label is omitted.
- Parameters:
label – the text to use as the label of the frame
Methods
-
class Frame
-
get_child() → Widget | None
Gets the child widget of frame
.
-
get_label() → str | None
Returns the frame labels text.
If the frame’s label widget is not a GtkLabel
, None
is returned.
-
get_label_align() → float
Retrieves the X alignment of the frame’s label.
-
get_label_widget() → Widget | None
Retrieves the label widget for the frame.
-
set_child(child: Widget | None = None) → None
Sets the child widget of frame
.
- Parameters:
child – the child widget
-
set_label(label: str | None = None) → None
Creates a new GtkLabel
with the label
and sets it as the frame’s
label widget.
- Parameters:
label – the text to use as the label of the frame
-
set_label_align(xalign: float) → None
Sets the X alignment of the frame widget’s label.
The default value for a newly created frame is 0.0.
- 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.
-
set_label_widget(label_widget: Widget | None = None) → None
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.
- Parameters:
label_widget – the new label widget
Properties
-
class Frame
-
props.child: Widget
The child widget.
-
props.label: str
Text of the frame’s label.
-
props.label_widget: Widget
Widget to display in place of the usual frame label.
-
props.label_xalign: float
The horizontal alignment of the label.
Virtual Methods
-
class Frame
-
do_compute_child_allocation(allocation: Rectangle) → None
- Parameters:
allocation
Fields
-
class Frame
-
parent_instance