belfrywidgets
belfrywidgets copied to clipboard
ToolTips for ttk.Treeview elements/nodes
Do you know a way to use ToolTip
on elements/nodes of a ttk.Treeview
?
I tried to use tag=
but this causes errors like this
File "feedtreeview.py", line 101, in add_dev_info
ToolTip(self, 'Tooltip', tag=iid)
File "/usr/local/lib/python3.6/dist-packages/belfrywidgets/tooltip.py", line 21, in __init__
self.widget.tag_bind(tag, "<Enter>", self.enter)
File "/usr/lib/python3.6/tkinter/ttk.py", line 1467, in tag_bind
self._bind((self._w, "tag", "bind", tagname), sequence, callback, add=0)
File "/usr/lib/python3.6/tkinter/__init__.py", line 1203, in _bind
self.tk.call(what + (sequence, cmd))
_tkinter.TclError: unsupported event <Enter>
only key, button, motion, and virtual events supported
The ‘tag’ argument is only for the standard Text widget, to add tooltips for a specific text tag. I haven’t tried to use the ToolTip with ttk widgets. I’ll have to experiment.