Gtk2::Frame(3)
π Gtk2::Frame β the pretty little box that wraps your stuff π
okay bestie, so this is Gtk2::Frame, from the User Contributed Perl Documentation crew, and it's literally just a wrapper for GtkFrame. That's it, that's the gig. It's the frame β the decorative border situation you put around other widgets so they look like they belong together. Very "this is my section" energy. π
πΈ HIERARCHY πΈ
the family tree, and yes we're listing every single ancestor, no skipping:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Bin
+----Gtk2::Frame
she comes from a long line of icons, we respect the lineage π
β¨ INTERFACES β¨
the vibes she carries with her:
Glib::Object::_Unregistered::AtkImplementorIfaceGtk2::Buildable
π«Ά METHODS π«Ά
π¦ widget = Gtk2::Frame->new ($label=undef)
make a brand new frame, slay. arguments:
$labelβ a string orundef. it's the text that goes on the frame, or you can just pass nothing and live your truth.
π¦ (xalign, yalign) = $frame->get_label_align
π¦ $frame->set_label_align ($xalign, $yalign)
where the label sits inside the frame. getter hands you back both values, setter takes both:
$xalignβ adouble$yalignβ adouble
π¦ string = $frame->get_label
π¦ $frame->set_label ($label=undef)
grab the label text or set it:
$labelβ a string orundef
π¦ widget = $frame->get_label_widget
π¦ $frame->set_label_widget ($label_widget)
not feeling a plain text label? put a whole widget in there instead, main character move:
$label_widgetβ aGtk2::Widget
π¦ shadowtype = $frame->get_shadow_type
π¦ $frame->set_shadow_type ($type)
controls how the border is styled:
$typeβ aGtk2::ShadowType
π PROPERTIES π
'label'(string: defaultundef: readable / writable / private / static-nick / static-blurb) β the text of the frame's label, iconic.'label-widget'(Gtk2::Widget: defaultundef: readable / writable / private / static-nick / static-blurb) β a widget to display in place of the usual frame label.'label-xalign'(float: default0: readable / writable / private / static-nick / static-blurb) β the horizontal alignment of the label.'label-yalign'(float: default0.5: readable / writable / private / static-nick / static-blurb) β the vertical alignment of the label.'shadow'(Gtk2::ShadowType: default"etched-in": readable / writable / private / static-nick / static-blurb / deprecated) β bestie. it's deprecated. useshadow_typeinstead, okay? no cap. π«'shadow-type'(Gtk2::ShadowType: default"etched-in": readable / writable / private / static-nick / static-blurb) β the appearance of the frame border.
π ENUMS AND FLAGS π
enum Gtk2::ShadowType
all the shadow moods, pick your fighter:
'none'/GTK_SHADOW_NONE'in'/GTK_SHADOW_IN'out'/GTK_SHADOW_OUT'etched-in'/GTK_SHADOW_ETCHED_IN'etched-out'/GTK_SHADOW_ETCHED_OUT
π SEE ALSO π
go read these too, they're part of the lore:
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
and that's the whole page, bestie π this was Gtk2::Frame(3), part of the User Contributed Perl Documentation, brought to you by perl v5.42.0 and dated 2025-07-25. go frame something pretty. periodt. β¨π¦π
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms