Custom-Tooltip

Basic Hover Tooltip for Tkinter based off of Tkinter's built in tooltip


Keywords
python, tkinter, hovertip, tooltip, infotip, bubble, custom, gui, hover, message, popup, texttip
License
MIT
Install
pip install Custom-Tooltip==1.4.1

Documentation

Custom-Tkinter-Tooltip

Basic Hover Tooltip for Tkinter based off of Tkinter's built in tooltip with the added ability to customize most options

Install:

pip install --upgrade Custom-Tooltip

https://pypi.org/project/Custom-Tooltip/

Uninstall:

pip uninstall Custom-Tooltip

Use:

Example:

from custom_hovertip import CustomTooltipLabel
CustomTooltipLabel(anchor_widget=button1, text="This is tooltip text for button1.")

Full Example:

from tkinter import *
from custom_hovertip import CustomTooltipLabel

top = Tk()
top.title("Test Custom Tooltip")
label = Label(top, text="Place your mouse over buttons")
label.pack()
button1 = Button(top, text="Button 1")
button1.pack()
CustomTooltipLabel(anchor_widget=button1, text="This is tooltip text for button1.")
button2 = Button(top, text="Button 2")
button2.pack()
CustomTooltipLabel(anchor_widget=button2, text="This is tooltip\ntext for button2.", background="grey",
                   foreground="black", width=15, justify=CENTER)
top.mainloop()

You only have to define the widget it's anchored to as well as the text. You can see this example under button1

Customization:

References to the Label Widget: https://www.tutorialspoint.com/python/tk_label.htm and https://www.pythontutorial.net/tkinter/tkinter-label/

Options that can be changed are: justify, foreground, background, relief, font, wraplength, anchor, border, width, textvariable

Pictures:

image

image

image