Closed gnikit closed 1 year ago
@karimawii there is a bug in your sample code, calling .pack()
to your Label
and then assigning that to label
will always be non since pack()
returns None
.
You should probably be doing something like
def populate(frame):
for item in fonts:
label = Label(frame,text=text,font=(item, 40))
label.pack()
tip = ToolTip(label,msg=item)
Seems like I got the idea wrong, I meant to add the ability to bind tooltips to other widgets, in my application I have a scrolling set of labels, and I want to add tooltips to all of them, but I can't bind the tooltips to the rest of the canvas to have it all scroll and be in the right place when I hover.
My code:
as you can see, I can't bind the Tooltip, it gives the following error:
Originally posted by @karimawii in https://github.com/gnikit/tkinter-tooltip/issues/19#issuecomment-1442082450