&|Purpose: | Embed context sensitive help into a Tcl/Tk application |& &|See also:| [balloon help] |& &|Credits: | [DKF]s https://stackoverflow.com/questions/35576895/display-hint-of-any-widget-on-mouse-over-in-tcl-tk%|%answer to a respective question%|% on stack overflow.|& &|Pros: | As simple as can be, no external dependencies, no clutter, less distraction |& &|Cons: | Always needs space on the GUI, less obvious help for unexperienced users. |& [LEG] Instead of popping up an extra window for tooltip help: * Reserve some space on your GUI for displaying the respective help text. This can be a status line on the bottom of the window. * Update this help text with the / events of the respective widgets. Example code: ====== # a global variable, you might want to put this in a namespace set help "Hover over any widget to get help for it" proc help {widget text} { # register help text with widget bind $widget +[list set ::help $text] bind $widget +[list set ::help ""] } # create the help text widget somewhere on your applications top level # window or in some frame $w label $w.help -textvariable help -anchor nw -justify left # register help for the help window itself help $w.help "Hover over any widget to get help for it" ====== % in text gets substituted according to [bind] rules. Use %% to get a simple percent sign. Variable substitution in text is done in the moment the help text is registered. See [Bindings and variable substitution] for hints how to change this. <>Example | GUI