widget_toolbar(3tk)
π widget_toolbar β the Toolbar Megawidget, bestie edition π
okay so this is widget_toolbar from the Various megawidgets crew, living in the widget_toolbar(3tk) manual page. she's a toolbar. she's a megawidget. she's lowkey a snidget. and she is about to make your Tk app look so put together. π
β¨ NAME β¨
widget_toolbar β Toolbar Megawidget π
π¦ SYNOPSIS π¦
package require Tcl 8.4
package require Tk 8.4
package require widget ?3.0?
package require widget::toolbar ?1.0?
widget::toolbar pathname ?options?
getframe
add ?item? ?args?
delete item1 ?item2? ?...?
itemcget symbol option
itemconfigure symbol ?args?
items ?pattern?
remove ?-destroy? item1 ?item2? ?...?
the ?3.0? and ?1.0? and all the ?item? / ?args? question marks are fr fr doing the "this part is optional" thing. she said maybe, maybe not, we'll see. π
πΈ DESCRIPTION πΈ
so this package hands you a toolbar megawidget β and the original is very extra about calling it a snidget, which is iconic of it. she makes use of the Tile/Ttk themed widget set, so she's themed, she's coordinated, she's not out here clashing with the rest of your UI. no cap.
here's the whole cast of commands, again, because she likes to say it twice:
widget::toolbar pathname ?options?
getframe
add ?item? ?args?
delete item1 ?item2? ?...?
itemcget symbol option
itemconfigure symbol ?args?
items ?pattern?
remove ?-destroy? item1 ?item2? ?...?
not me noticing the SYNOPSIS and the DESCRIPTION are serving the exact same list. she's consistent. we respect that. π
π§ WIDGET OPTIONS π§
these are the widget-level ones. the original doesn't give descriptions for them, so I'm not out here making things up β she's just mysterious like that. π
-ipadβ a widget option. that's all she wrote, bestie.-padβ also a widget option. the girlies stay cryptic.-separatorβ yes, another widget option. slay.
β ITEM OPTIONS β
and these ones live at the item level. same deal β the page lists them, the page does not explain them, and I will not be inventing lore.
-padβ an item option.-separatorβ an item option.-stickyβ an item option.-weightβ an item option.
π₯ EXAMPLE π₯
here's the moment. the demo. the main character energy:
package require widget::toolbar ; # or widget::all
set t [widget::toolbar .t]
pack $t -fill x -expand 1
$t add button [button .b -text foo]
$t add separator -pad {2 4}
$t add button [button .c -text bar]
look at her go. buttons, a separator, -fill x -expand 1 so she stretches all the way across like she owns the place. because she does. π
π«Ά BUGS, IDEAS, FEEDBACK π«Ά
okay, real talk β this document, and the package it describes, will undoubtedly contain bugs and other problems. that's a direct quote, she's being honest with us, and honestly? growth.
- spotted a bug? report it in the category
widget::toolbarof the Tklib Trackers athttp://core.tcl.tk/tklib/reportlist. - got ideas for enhancements for the package and/or the documentation? she wants those too, same place.
please report both. she's asking nicely. π₯Ί
π KEYWORDS π
megawidget, snit, toolbar, widget
π CATEGORY π
Widget
and that's the whole page, bestie β brought to you by tklib, version 3.0, serving the widget_toolbar(3tk) manual. go build a toolbar that eats. periodt. πβ¨
π¦ where this page comes from
- debian trixie: tklib 0.9-1
- ubuntu questing: tklib 0.9-1
- ubuntu resolute: tklib 0.9-1build1
- ubuntu stonking: tklib 0.9-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms