ttk::label(3tk)
π ttk::label β the manual, but make it cute π
okay bestie, sit down, hydrate, and let me tell you about ttk::label, a themed widget from the Tk toolkit (this is the ttk::label(3tk) page, mwah π
).
β¨ NAME β¨
ttk::label β display a text string and/or image. that's it. that's the whole job. and she does it flawlessly. π
πΈ SYNOPSIS πΈ
ttk::label pathName ?options?
π¦ DESCRIPTION π¦
A ttk::label widget shows a textual label and/or an image. literally a glow-up for your text, no cap. π
and here's the iconic part: the label can be linked to a Tcl variable so the displayed text changes automatically. main character behavior. she updates herself. periodt. β¨
π STANDARD OPTIONS π
these are the standard girlies, the whole squad:
-anchor-class-compound-cursor-font-foreground-image-justify-padding-state-style-takefocus-text-textvariable-underline-width-wraplength
psst β for the full deets on any of these, go read the ttk_widget manual entry. she's got the lore. π
π WIDGET-SPECIFIC OPTIONS π
these ones are hers. custom. exclusive. iykyk. π«Ά
-background
- Command-Line Name:
-background - Database Name:
frameColor - Database Class:
FrameColor
the widget's background color. if you don't specify it, the theme default gets used. let the theme cook. π
-relief
- Command-Line Name:
-relief - Database Name:
relief - Database Class:
Relief
specifies the 3-D effect you want for the widget border. the valid values are: flat, groove, raised, ridge, solid, and sunken. pick your vibe, bestie. β¨
-wraplength
- Command-Line Name:
-wraplength - Database Name:
wrapLength - Database Class:
WrapLength
specifies the maximum line length, in pixels. if this option is negative or zero, then automatic wrapping is not performed β no wrapping, she just goes off the edge, iconic but chaotic π. otherwise the text gets split into lines such that no line is longer than the value you specified. π§
π WIDGET COMMAND π
label widgets support the standard commands cget, configure, identify element, instate, state and style. (check ttk::widget for those β she's the source of truth. π)
π STYLING OPTIONS π
the class name for a ttk::label is TLabel.
Dynamic states: disabled, readonly.
TLabel styling options you can configure with ttk::style are:
-backgroundcolor-compoundcompound-foregroundcolor-fontfont
heads up bestie: some options are only available for specific themes. not every theme comes with the full closet. π
for the full tea on how to configure ttk styles, see the ttk::style manual page.
π₯ SEE ALSO π₯
ttk::widget(3tk)label(3tk)
π cute sign-off π
that's the whole page, bestie β this manual is from Tk 8.5, and it's filed under ttk::label(3tk). go forth and label things beautifully. slay, ate, no crumbs. ππ
π¦
π¦ where this page comes from
- debian trixie: tk9.0-doc 9.0.1-3
- ubuntu questing: tk9.0-doc 9.0.2-1
- ubuntu resolute: tk9.0-doc 9.0.3-1
- ubuntu stonking: tk9.0-doc 9.0.4-1
- Copyright (c) 2004 Joe English
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms