Available as/for:release-stablesource-package
Description:Tkinter (tcl/tk interface for Python) lacks tooltips for its widgets.
This is class which implements tooltips for arbitrary tkinter/ttk widgets.
Just add extra tooltip attribute to the instance of a widget as follows:
mywidget = some tkinter widget
mywidget.tooltip = ToolTip(mywidget, 'Some text')
ToolTip constructor can take extra arguments for delay in ms before tooltip is shown and/or tooltip text wrap length in pixels and/or timeout in ms before tooltip is automatically hidden. For example:
mywidget.tooltip = ToolTip(mywidget, 'Some text', delay=500, wrap=200, timeout=2000)
Default delay is 2000 ms, default wrap length is 200 pixels and default timeout is 4000 ms. Turn off timeout by passing 0 as timeout value.
This code is based on ideas from
https://www.daniweb.com/programming/software-development/code/484591/a-tooltip-class-for-tkinter
https://stackoverflow.com/questions/3221956/how-do-i-display-tooltips-in-tkinter/36221216#36221216
http://svn.effbot.org/public/stuff/sandbox/wcklib/wckToolTips.py
Ratings & Comments
0 Comments