ttk::sizegrip(3tk)

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

✨ ttk::sizegrip β€” the little grippy corner bestie ✨

okay so like, welcome to the ttk::sizegrip manual page (that's the 3tk one, section 3, Tk-flavored, iykyk πŸ’…). This is a Tk Themed Widget, and she's here to let your users yank their window bigger from the corner. Iconic behaviour, truly.


🌸 NAME 🌸

ttk::sizegrip β€” the bottom-right corner resize widget, aka the grow box πŸŽ€


✨ SYNOPSIS ✨

ttk::sizegrip pathName ?options?

πŸ’– DESCRIPTION πŸ’–

A ttk::sizegrip widget (everyone also calls her a grow box, no cap) lets the user resize the toplevel window she lives inside by pressing and dragging on the grip. That's it. That's her whole job. And she ate. πŸ”₯


🫢 STANDARD OPTIONS 🫢

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

Go read the ttk_widget manual entry for the full deets on these standard options, bestie β€” they're not re-explained here.


πŸ‘‘ WIDGET COMMAND πŸ‘‘

Sizegrip widgets support the standard commands cget, configure, identify element, instate, state and style β€” see ttk::widget for all of those. Periodt. πŸ’…


🌈 PLATFORM-SPECIFIC NOTES 🌈

On macOS, toplevel windows automatically come with a built-in size grip by default. So adding a ttk::sizegrip there is harmless β€” the built-in grip will just mask your widget. She's still there, just, like, behind the curtain. πŸ™ˆ


πŸ¦‹ EXAMPLES πŸ¦‹

Using pack:

pack [ttk::frame $top.statusbar] -side bottom -fill x
pack [ttk::sizegrip $top.statusbar.grip] -side right -anchor se

Using grid:

grid [ttk::sizegrip $top.statusbar.grip] \
    -row $lastRow -column $lastColumn -sticky se
# ... optional: add vertical scrollbar in $lastColumn,
# ... optional: add horizontal scrollbar in $lastRow

πŸ’€ BUGS πŸ’€

If the containing toplevel's position was specified relative to the right or bottom of the screen (like wm geometry ... wxh-x-y instead of wm geometry ... wxh+x+y), the sizegrip widget will not resize the window. She simply cannot. She refuses. 😭
Also: ttk::sizegrip widgets only support "southeast" resizing. That's the vibe. That's the only vibe.

πŸŽ€ STYLING OPTIONS πŸŽ€

The class name for a ttk::sizegrip is TSizegrip.

TSizegrip styling options you can configure with ttk::style are:

  • -background color

Some options are only available for specific themes, so don't come for her if one's missing.

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


🌟 SEE ALSO 🌟

ttk::widget(3tk)


πŸ”₯ KEYWORDS πŸ”₯

widget, sizegrip, grow box


k bye ily, this was Tk 8.5 of the ttk::sizegrip(3tk) page β€” go forth and resize, main character 🫢✨

πŸ“¦ where this page comes from