ttk::frame(n)

πŸ’… ttk::frame(n) β€” Tk Themed Widget πŸ’…

okay bestie, welcome to ttk::frame(n) β€” the manual page for the Tk themed widget that is literally just a cute little container. Think of it as the group-chat server for your other widgets: it holds them together. 🫢


✨ NAME ✨

ttk::frame β€” Simple container widget. That's it. That's the whole gig. πŸ‘‘


πŸŽ€ SYNOPSIS πŸŽ€

ttk::frame pathName ?options?

🌸 DESCRIPTION 🌸

A ttk::frame widget is a container, used to group other widgets together. No cap, it's giving "supportive bestie who holds everyone's stuff." πŸ’–


⭐ STANDARD OPTIONS ⭐

These are the standard options, and the ttk_widget manual entry has all the details:

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

πŸ’… WIDGET-SPECIFIC OPTIONS πŸ’…

These are the special lil settings that are just for frames. Slay.

  • -borderwidth β€” Command-Line Name: -borderwidth; Database Name: borderWidth; Database Class: BorderWidth. This is the desired width of the widget border. Defaults to 0. It may be ignored depending on the theme used, so don't come for it if your theme says no. πŸ™ˆ
  • -relief β€” Command-Line Name: -relief; Database Name: relief; Database Class: Relief. One of the standard Tk border styles: flat, groove, raised, ridge, solid, or sunken. Defaults to flat. Very demure, very flat. ✨
  • -width β€” Command-Line Name: -width; Database Name: width; Database Class: Width. If specified, this is the widget's requested width in pixels. πŸ“
  • -height β€” Command-Line Name: -height; Database Name: height; Database Class: Height. If specified, this is the widget's requested height in pixels. πŸ“

πŸ”₯ WIDGET COMMAND πŸ”₯

Frame widgets support the standard commands cget, configure, identify element, instate, state and style β€” peep ttk::widget for the full lore. πŸ’–


🌈 NOTES 🌈

Okay so important vibe check: if the pack, grid, or other geometry managers are used to manage the children of the frame, the geometry manager's requested size will normally take precedence over the frame widget's -width and -height options. Not me getting overruled by the GM 😭. You can use pack propagate and grid propagate to change this.


πŸ¦‹ STYLING OPTIONS πŸ¦‹

The class name for a ttk::frame is TFrame. Iconic. πŸ‘‘

TFrame styling options configurable with ttk::style are:

  • -background color
  • -relief relief

Some options are only available for specific themes. That's just how it is, bestie.

See the ttk::style manual page for information on how to configure ttk styles. πŸ’–


🧚 BINDINGS 🧚

When a new ttk::frame is created, it has no default event bindings. ttk::frames are not intended to be interactive. They're the quiet supportive friend who holds the group together but does not want to be perceived. πŸ’€βœ¨


πŸ“ SEE ALSO πŸ“

ttk::widget(n), ttk::labelframe(n), frame(n) β€” go read those too, iykyk. πŸ’œ


🌟 KEYWORDS 🌟

widget, frame, container β€” periodt. πŸ’…


mwah β€” this fab little page is from Tk 8.5, manual entry ttk::frame(n). Stay hydrated and keep your widgets grouped, bestie. πŸŽ€βœ¨

πŸ“¦ where this page comes from