Labelframe(3pm)
π Labelframe(3pm) β Tk::Labelframe π
okay bestie, welcome to Tk::Labelframe from the User Contributed Perl Documentation β¨ this is the manual page for making Labelframe widgets and she's cute, she's simple, she's a vibe. let's go π«Ά
πΈ NAME πΈ
Tk::Labelframe β Create and manipulate Labelframe widgets π
β¨ SYNOPSIS β¨
$labelframe = $parent->Labelframe(?options?);
-borderwidth -highlightbackground -pady
-cursor -highlightcolor -relief
-font -highlightthickness -takefocus
-foreground -padx -text
likeβ¦ that's it. that's the whole entrance. iconic. π
π WIDGET-SPECIFIC OPTIONS π
these are the options that make Labelframe Labelframe, yk? each one gets an Option, a Name, and a Class, and we're listing all of them, no skips, no cap.
-backgroundβ Name:background, Class:Background- same energy as the standard background option, EXCEPT its value can also be an empty string. and if you do that? the widget displays no background or border, and no colors get consumed from its colormap for its background and border. saving that colormap budget bestie π
-classβ Name:class, Class:Class- specifies a class for the window. this class gets used when querying the option database for the window's other options, and it also gets used later for other purposes like bindings. the class option may not be changed with the configure method β it's locked in, periodt.
-colormapβ Name:colormap, Class:Colormap- specifies a colormap to use for the window. the value can be either
new, in which case a brand new colormap is created for the window and its children, or the name of another window (which has to 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 at all, the new window just uses the same colormap as its parent. this option may not be changed with the configure method β nope, not happening.
- specifies a colormap to use for the window. the value can be either
-containerβ Name:container, Class:Container- the value must be a boolean. if true, it means this window will 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 things like geometry requests. and listen β the window should not have any children of its own in this application. this option may not be changed with the configure method either.
- the value must be a boolean. if true, it means this window will be used as a container that some other application gets embedded into (for example, a Tk toplevel can be embedded using the
-heightβ Name:height, Class:Height- specifies the desired height for the window, in any of the forms acceptable to
Tk_GetPixels. if this option is less than or equal to zero then the window won't request any size at all. it's giving "no thoughts, no dimensions" π
- specifies the desired height for the window, in any of the forms acceptable to
-labelanchorβ Name:labelAnchor, Class:LabelAnchor- specifies where to place the label. note that a label is only displayed if the
-textoption is not the empty string. valid values for this option are (listing them clockwise)nw,n,ne,en,e,es,se,s,sw,ws,wandwn. the default value isnw. clockwise rotation, main character energy π
- specifies where to place the label. note that a label is only displayed if the
-labelwidgetβ Name:labelWidget, Class:LabelWidget- specifies a widget to use as the label. this overrides any
-textoption. the widget must exist before being used as-labelwidget, and if it's not a descendant of this window, it will be raised above it in the stacking order. so likeβ¦ make it first, then flex it π
- specifies a widget to use as the label. this overrides any
-visualβ Name:visual, Class:Visual- specifies visual information for the new window in any of the forms accepted by
Tk_GetVisual. if this option isn't specified, the new window uses the same visual as its parent. the visual option may not be modified with the configure method.
- specifies visual information for the new window in any of the forms accepted by
-widthβ Name:width, Class:Width- specifies the desired width for the window, in any of the forms acceptable to
Tk_GetPixels. if this option is less than or equal to zero then the window won't request any size at all. same deal as height, just sideways π
- specifies the desired width for the window, in any of the forms acceptable to
π¦ DESCRIPTION π¦
the Labelframe method creates a new window (given by the $labelframe argument) and makes it into a Labelframe widget. additional options, described above, may be specified on the command line or in the option database to configure aspects of the Labelframe such as its background color and relief. β¨
a Labelframe is a simple widget. its primary purpose is to act as a spacer or container for complex window layouts. it has all the features of a Frame plus the ability to display a label. so basically: Frame but with a little name tag π·οΈπ
π WIDGET METHODS π
the Labelframe method may be used to invoke various operations on the widget. it has the following general form:
$widget->method(?arg arg ...?);
the following methods are possible for Labelframe widgets:
$widget->cget(option);- returns the current value of the configuration option given by option. option may have any of the values accepted by the Labelframe command. it's the "tell me everything rn" method π
$widget->configure(?option?, ?value, option, value, ...?);- query or modify the configuration options of the widget. if no option is specified, returns a list describing all of the available options for
$widget(seeTk::configurefor information on the format of this list). if option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). if one or more option-value pairs are specified, then the command modifies the given widget option(s) to have the given value(s); in this case the command returns an empty string. option may have any of the values accepted by the Labelframe command. she can read, she can write, she can do both π
- query or modify the configuration options of the widget. if no option is specified, returns a list describing all of the available options for
π BINDINGS π
when a new Labelframe is created, it has no default event bindings: Labelframes are not intended to be interactive.
ngl bestie, she's decorative. she's the frame, not the drama. don't expect her to click back π
π SEE ALSO π
Tk::FrameTk::Label
β KEYWORDS β
Labelframe, widget
and that's the whole page, bestie!! π this one shipped as part of perl v5.40.1, dated 2025-04-13 β so go forth and build your little labeled containers, you absolute icon π«Άπβ¨
π¦ 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