Basics
Guides
API Reference
Basics
Guides
API Reference
[26:7] extends: object
Surrounds its child with a decorative frame and an optional label.
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 An example of
a UI definition fragment with GtkFrame: xml <object class="GtkFrame"> <property name="label-widget"> <object class="GtkLabel" id="frame_label"/> </property> <property name="child"> <object class="GtkEntry" id="frame_content"/> </property> </object> # CSS nodes frame ├── <label widget> ╰── <child> GtkFrame has a main CSS node with name
“frame”, which is used to draw the visible border. You can set the appearance
of the border using CSS properties like “border-style” on this node. #
Accessibility GtkFrame uses the [enum@Gtk.AccessibleRole.group] role.
Frame (label = null)
Creates a new
GtkFrame, with optional label @label. If @label is %NULL, the label is omitted.
label is the text to use as the label of the frame.toNativeHandle (Source)
Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from
fn.call(...), another generated wrapper exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asWidget ()
Wraps this handle as
Widget.
A Widget object.asAccessible ()
Wraps this handle as
Accessible.
A Accessible object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asConstraintTarget ()
Wraps this handle as
ConstraintTarget.
A ConstraintTarget object.getProperty (string Name)
Reads one generated property by name.
setProperty (string Name, Value)
Writes one generated property by name.
setChild (object Value)
The child widget.
Value is the new property value.None.setLabel (string Value)
Text of the frame's label.
Value is the new property value.None.setLabelwidget (object Value)
Widget to display in place of the usual frame label.
Value is the new property value.None.setLabelxalign (double Value)
The horizontal alignment of the label.
Value is the new property value.None.get_child ()
Gets the child widget of @frame.
get_label ()
Returns the frame labels text. If the frame's label widget is not a
GtkLabel, %NULL is returned.
get_label_align ()
Retrieves the X alignment of the frame’s label.
get_label_widget ()
Retrieves the label widget for the frame.
set_child (object child)
Sets the child widget of @frame.
child is the child widget.None.set_label (string label)
Creates a new
GtkLabelwith the @label and sets it as the frame's label widget.
label is the text to use as the label of the frame.None.set_label_align (double xalign)
Sets the X alignment of the frame widget’s label. The default value for a newly created frame is 0.0.
xalign is 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..None.set_label_widget (object label_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.
label_widget is the new label widget.None.[296:14] static extends: object
Generated metadata helpers for Frame class surfaces.
properties ()
Returns property metadata for
Frame.
A list.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.