tk_menuBar(n)

πŸ“¦
version 8.6.17 Β· 2 versions
  • 8.6.17 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, opensuse-leap 16.0 (latest)
  • 8.6.10 Β· centos-stream 9
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, opensuse-leap 16.0

πŸ’– tk_menuBar(n) β€” a Tk Built-In Commands moment πŸ’–

okay bestie, so this is tk_menuBar (and its ride-or-die tk_bindForTraversal) from the Tk Built-In Commands corner of the universe β€” and listen, this one is a certified throwback. πŸŽ€


✨ NAME ✨

tk_menuBar, tk_bindForTraversal β€” literally the obsolete support for menu bars. that's it, that's the vibe. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

tk_menuBar frame ?menu menu ...?

tk_bindForTraversal arg arg ...

🌸 DESCRIPTION 🌸

okay so story time. these procedures were used back in Tk 3.6 and earlier releases to help manage pulldown menus and to implement keyboard traversal of menus. like, genuinely useful back in the day. πŸ‘‘

but in Tk 4.0 and later releases? they are no longer needed. not me finding out my faves are washed 😭. stubs for these procedures have been retained for backward compatibility, but β€” and this is the important part, no cap β€” they have no effect. none. zero. they're giving ghost town. πŸ’€

you should remove calls to these procedures from your code, since eventually the procedures will go away. fr fr, this is a warning, not a drill. πŸ™ˆ

🫢 from Tk 8.0 onwards, you should instead construct your menubar as a normal menu and then attach it to the toplevel of your choice using the -menu option of that widget. that's the main character move now. periodt.

πŸ”₯ SEE ALSO πŸ”₯


⭐ KEYWORDS ⭐

keyboard traversal, menu, menu bar, post


and that's the whole page, bestie, we ate and left no crumbs 🌈🧚 β€” this lil sign-off comes to you courtesy of Tk, the source/version stamped on tk_menuBar(n) πŸ’œπŸ¦‹ (the page didn't hand me a date, so the footer's just repping Tk itself, iykyk βœ¨πŸ“).

πŸ“¦ where this page comes from