tipstack(3tk)

πŸ’– tipstack β€” Stacked tooltips πŸ’–

okay bestie, welcome to tipstack, from the tklib fam. it's the tipstack(3tk) page, it lives under "Tooltip management," and it's genuinely one of the cutest little packages you'll ever meet. let's get into it 🫢


✨ NAME ✨

tipstack β€” Stacked tooltips. that's it, that's the whole name, and honestly? iconic. πŸ‘‘


✨ SYNOPSIS ✨

first up, the vibes check β€” you gotta have your prerequisites lined up before any of this slays:

package require Tcl 8.5

package require msgcat 1.3

package require tooltip ?1.7?

package require tipstack ?1.0.1?

and here are the commands you're getting, all lined up and ready:

::tipstack::push widget ?-index index? text

::tipstack::pop widget ?-index index?

::tipstack::clear widget ?-index index?

::tipstack::def widget text ...

::tipstack::defsub base widget text ...

::tipstack::clearsub base

✨ DESCRIPTION ✨

so this package is literally an extension of the tooltip package. it gives you a dynamic stack of tip texts per widget πŸ’… β€” yes, per widget, and yes, a whole stack.

what does that mean for you? it means you can do dynamic, transient changes to the tips. like, say you've got a field with a nice standard explanation of what it does, and then boom β€” an error message shows up. instead of nuking your original tip forever, you just stack the error on top. when the error's gone, you pop it off and your OG explanation is right back. it's giving ✨graceful✨. it's giving main character energy. it's giving "my tooltip has layers." πŸ¦‹


✨ COMMANDS ✨

::tipstack::push widget ?-index index? text

pushes a brand new text onto the tooltip stack for the widget. stacking queen behavior. πŸ‘‘

in case of a list widget, use:

-index ...

to point at the tooltip you mean.

the result of the command is the empty string. yes bestie, it returns nothing. that's normal, don't panic.

::tipstack::pop widget ?-index index?

pops the current tooltip off the stack for the widget and restores the previous text. like undoing a message in the group chat. πŸ’€

important: this is a no-operation if popping would leave an empty stack behind. in other words, the baseline tooltip text cannot be popped off. the baseline is sacred. periodt.

in case of a list widget, use:

-index ...

to point at the tooltip you mean.

the result of the command is the empty string.

::tipstack::clear widget ?-index index?

clears the whole stack for the widget and restores back to the baseline. one call, everything gone, back to the original. very "cleaning my room at 3am" energy. 🧹✨

in case of a list widget, use:

-index ...

to point at the tooltip you mean.

the result of the command is the empty string.

::tipstack::def widget text ...

does multiple pushes for a bunch of independent widgets in a single call. efficiency icon. ⭐

heads up: this command cannot be used for list widgets, because it doesn't let you pass the necessary index information. also, use with menus is not possible either.

the result of the command is the empty string.

::tipstack::defsub base widget text ...

this one's a variant of ::tipstack::def where all the widgets you're pushing to are subwidgets of the base. perfect for mega-widgets, honestly built for them. 🌈

note: either each widget has to be specified with a proper leading dot (.), or the base has to be specified with a trailing dot.

the result of the command is the empty string.

::tipstack::clearsub base

a variant of ::tipstack::clear which clears all child widgets of the base that text was pushed to. πŸŽ€

heads up: use with menus is not possible.

the result of the command is the empty string.


✨ BUGS, IDEAS, FEEDBACK ✨

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. it's not a read, it's a promise. 😭

please report such in the category tooltip of the Tklib Trackers at http://core.tcl.tk/tklib/reportlist.

please also report any ideas for enhancements you may have for either the package and/or the documentation. we love a glow-up suggestion. πŸ’–


✨ KEYWORDS ✨

balloon, help, hover, tipstack β€” collect them all, they're basically stickers. 🌸


Copyright (c) 2003 ActiveState Corp


and that's the whole page bestie!! this one came from tklib, version 1.0.1, and the page itself is dated tipstack(3tk). go stack some tooltips, you're gonna ate. πŸ’…βœ¨πŸ«Ά

πŸ“¦ where this page comes from