Frame


Object Hierarchy:

Gtk.Frame Gtk.Frame Gtk.Frame Gtk.Bin Gtk.Bin Gtk.Bin->Gtk.Frame Gtk.Container Gtk.Container Gtk.Container->Gtk.Bin Gtk.Widget Gtk.Widget Gtk.Widget->Gtk.Container GLib.InitiallyUnowned GLib.InitiallyUnowned GLib.InitiallyUnowned->Gtk.Widget GLib.Object GLib.Object GLib.Object->GLib.InitiallyUnowned Atk.Implementor Atk.Implementor Atk.Implementor->Gtk.Frame Atk.Implementor->Gtk.Bin Atk.Implementor->Gtk.Container Atk.Implementor->Gtk.Widget Gtk.Buildable Gtk.Buildable Gtk.Buildable->Gtk.Frame Gtk.Buildable->Gtk.Bin Gtk.Buildable->Gtk.Container Gtk.Buildable->Gtk.Widget

Description:

[ CCode ( type_id = "gtk_frame_get_type ()" ) ]
public class Frame : Bin, Implementor, Buildable

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 set_label_align.

GtkFrame as GtkBuildable

The GtkFrame implementation of the Buildable interface supports placing a child in the label position by specifying “label” as the “type” attribute of a `<child>` element. A normal content child can be specified without specifying a `<child>` type attribute.

An example of a UI definition fragment with `GtkFrame`:

<object class="GtkFrame">
<child type="label">
<object class="GtkLabel" id="frame-label"/>
</child>
<child>
<object class="GtkEntry" id="frame-content"/>
</child>
</object>

CSS nodes

frame
├── border[.flat]
├── <label widget>
╰── <child>
ain CSS node named “frame” and a subnode named “border”. The “border” node is used to draw the visible border. You can set the appearance of the border using CSS properties like “border-style” on the “border” node.

The border node can be given the style class “.flat”, which is used by themes to disable drawing of the border. To do this from code, call set_shadow_type with gtk_shadow_none to add the “.flat” class or any other shadow type to remove it.

GtkFrame

All known sub-classes:

Namespace: Gtk
Package: gtk+-3.0

Content:

Properties:

Creation methods:

Methods:

Inherited Members:

All known members inherited from class Gtk.Bin
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
All known members inherited from interface Atk.Implementor



2022 vala-language.org