:right-sidebar: True Frame =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: Frame(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget` ``GtkFrame`` is a widget that surrounds its child with a decorative frame and an optional label. .. image:: https://docs.gtk.org/gtk4/frame.png If present, the label is drawn inside the top edge of the frame. The horizontal position of the label can be controlled with :obj:`~gi.repository.Gtk.Frame.set_label_align`. ``GtkFrame`` clips its child. You can use this to add rounded corners to widgets, but be aware that it also cuts off shadows. GtkFrame as GtkBuildable ------------------------ The ``GtkFrame`` implementation of the ``GtkBuildable`` interface supports placing a child in the label position by specifying “label” as the “type” attribute of a ```` element. A normal content child can be specified without specifying a ```` type attribute. An example of a UI definition fragment with GtkFrame: .. code-block:: :dedent: CSS nodes --------- .. code-block:: :dedent: frame ├──