ttk::frame(3tk)

πŸ“¦
version 9.0.4 Β· 3 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– ttk::frame β€” the manual page, but make it cute

okay so bestie, this is ttk::frame(3tk), from the Tk Themed Widget family, and honestly? it's the chillest little icon in the whole toolkit. no drama, no main character antics, just vibes and containment. let's get into it πŸ’…


✨ NAME ✨

ttk::frame β€” a simple container widget πŸŽ€

like, "simple" as in unbothered. it holds your other widgets. that's the job. that's the whole job. and it ate.


🌸 SYNOPSIS 🌸

ttk::frame pathName ?options?

πŸ¦‹ DESCRIPTION πŸ¦‹

a ttk::frame widget is a container, and its entire purpose in life is to group other widgets together 🫢 that's it. that's the girl. she's a group chat, and all your other widgets are the members. no cap.


πŸ’œ STANDARD OPTIONS πŸ’œ

she comes with the classics, fr fr:

  • -class
  • -cursor
  • -padding
  • -style
  • -takefocus

head over to the ttk_widget manual entry if you want the full tea on all the standard options β˜•


πŸ‘‘ WIDGET-SPECIFIC OPTIONS πŸ‘‘

these are the ones that are hers.

  • -borderwidth β€” database name borderWidth, database class BorderWidth. this is the desired width of the widget border. defaults to 0. and like... lowkey it may be ignored depending on the theme used πŸ™ˆ so don't come for her if your theme said no.
  • -relief β€” database name relief, database class Relief. one of the standard Tk border styles: flat, groove, raised, ridge, solid, or sunken. defaults to flat. pick your fighter ✨
  • -width β€” database name width, database class Width. if specified, the widget's requested width in pixels. yes bestie, requested. we'll get to that πŸ‘€
  • -height β€” database name height, database class Height. if specified, the widget's requested height in pixels.

πŸ’… WIDGET COMMAND πŸ’…

frame widgets support the standard commands cget, configure, identify element, instate, state and style β€” check ttk::widget for the receipts πŸ“œ


⚠️ NOTES ⚠️

okay this part matters, listen up:

if you use the pack, grid, or other geometry managers to manage the children of the frame, the GM's requested size will normally take precedence over the frame widget's -width and -height options. πŸ’€

so all that width and height you specified? yeah, the geometry manager might just walk in and rearrange the furniture. if you want to change that behavior, pack propagate and grid propagate are your besties. periodt.


🌈 STYLING OPTIONS 🌈

the class name for a ttk::frame is TFrame πŸŽ€

TFrame styling options configurable with ttk::style are:

  • -background color
  • -relief relief

some options are only available for specific themes β€” so if something's not working, it's not you, it's the theme bestie 🧚

see the ttk::style manual page for info on how to configure ttk styles ✨


πŸ™ˆ BINDINGS πŸ™ˆ

when a new ttk::frame is created, it has no default event bindings. none. zero. because ttk::frames are not intended to be interactive β€” she is not here to be clicked, she is here to hold space. queen of boundaries πŸ‘‘


πŸ”₯ SEE ALSO πŸ”₯

  • ttk::widget(3tk)
  • ttk::labelframe(3tk)
  • frame(3tk)

⭐ KEYWORDS ⭐

widget, frame, container


and that's the whole page, bestie!! go forth and group your widgets, you absolute icon πŸ’–βœ¨

this was Tk 8.5, page ttk::frame(3tk) β€” mwah, no notes, bye πŸŽ€πŸ’…πŸ¦‹

πŸ“¦ where this page comes from