Frame(3pm)
π Tk::Frame β Create and manipulate Frame widgets π
okay bestie, welcome to the User Contributed Perl Documentation section, and today's main character is Frame (the 3pm kind, aka a Perl module manpage, iykyk). she's simple, she's iconic, she's literally just a box. let's get into it π
β¨ SYNOPSIS β¨
$frame = $parent->Frame(?options?);
that's it. that's the whole vibe. you call Frame on a parent and you get a frame back. slay π
π«Ά STANDARD OPTIONS π«Ά
these are the standard ones she inherited, no notes:
-borderwidth-class-highlightbackground-highlightcolor-highlightthickness-relief-takefocus-cursor
heads up bestie: go read Tk::options for the deets on all of these standard options, they're not re-explained here. π
πΈ WIDGET-SPECIFIC OPTIONS πΈ
these are the ones that are hers, the little personality traits, if you will:
-backgroundβ Name:background, Class:Background. okay so this is the same as the standardbackgroundoption, EXCEPT her value can also be an undefined value. and if it is undefined?? the widget shows no background or border at all, and consumes no colors from its colormap for its background and border. minimalism, she invented it β¨-colormapβ Name:colormap, Class:Colormap. specifies a colormap to use for the window. the value can be eithernewβ in which case a brand new colormap gets created for the window and its children β or the name of another window (which must be on the same screen and have the same visual as$widget), in which case the new window uses the colormap from that specified window. if you don't specify the colormap option, the new window just uses the same colormap as its parent. π you may NOT change this one with theconfiguremethod. it's set in stone fr fr.-containerβ Name:container, Class:Container. the value must be a boolean. if it's true, that means this window is gonna be used as a container that some other application gets embedded into (for example, a Tk toplevel can be embedded using the-useoption). the window will support the appropriate window manager protocols for stuff like geometry requests. and here's the thing β the window should not have any children of its own in this application. also, nope, this option may not be changed with theconfiguremethod. periodt.-heightβ Name:height, Class:Height. specifies the desired height for the window, in any of the forms acceptable toTk_GetPixels. if this option is less than or equal to zero, the window won't request any size at all. zero thoughts, head empty π¦-visualβ Name:visual, Class:Visual. specifies visual information for the new window, in any of the forms accepted byTk_GetVisual. if you don't specify it, the new window uses the same visual as its parent. and again β thevisualoption may not be modified with theconfiguremethod. no touchy π-widthβ Name:width, Class:Width. specifies the desired width for the window, in any of the forms acceptable toTk_GetPixels. if this option is less than or equal to zero, the window won't request any size at all. same energy as height, honestly π
π DESCRIPTION π
okay so the Frame method creates a new window (given by the $widget argument) and makes it into a frame widget. additional options, described above, may be specified on the command line or in the option database, and they configure aspects of the frame like its background color and relief. the frame command returns the path name of the new window. π
a frame is a simple widget. like, genuinely simple. her primary purpose in life is to act as a spacer or a container for complex window layouts. that's the job. the only features of a frame are her background color and an optional 3-D border to make the frame appear raised or sunken. that's it!! she's the lowkey backbone of every layout and she doesn't even brag about it. main character energy but make it humble π
π WIDGET METHODS π
the Frame method creates a widget object. this object supports the configure and cget methods described in Tk::options, which you can use to enquire about and modify the options described above. the widget also inherits all the methods provided by the generic Tk::Widget class. so she's not just a box, she's a box with a whole family tree. π«Ά
π₯ BINDINGS π₯
when a new frame is created, it has no default event bindings: frames are not intended to be interactive. she's not here to be clicked, she's here to hold space. literally. π
β KEYWORDS β
frame, widget
and that's the whole page bestie, you ate that πβ¨
cute little sign-off: this page ships with perl v5.40.1 and was dated 2025-04-13. go build something gorgeous with your little boxes ππ¦π
π¦ where this page comes from
- debian trixie: perl-tk 1:804.036+dfsg1-5
- ubuntu questing: perl-tk 1:804.036+dfsg1-5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms