https://github.com/nenotriple/tktooltip
Add customizable tooltips to any tkinter widget.
https://github.com/nenotriple/tktooltip
tkinter tkinter-gui tooltips widget-library
Last synced: 12 months ago
JSON representation
Add customizable tooltips to any tkinter widget.
- Host: GitHub
- URL: https://github.com/nenotriple/tktooltip
- Owner: Nenotriple
- License: mit
- Created: 2024-10-17T23:34:20.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-19T22:43:50.000Z (about 1 year ago)
- Last Synced: 2025-05-19T23:38:13.613Z (about 1 year ago)
- Topics: tkinter, tkinter-gui, tooltips, widget-library
- Language: Python
- Homepage:
- Size: 42 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TkToolTip
Add customizable tooltips to any Tkinter widget.
# 💾 Install
🚩
1) Install in your enviroment:
- `pip install git+https://github.com/Nenotriple/TkToolTip.git`
2) Import within your python script:
- `from TkToolTip.TkToolTip import TkToolTip as Tip`
# 📝 Usage:
A) Directly create a tooltip:
1) ```Tip.create(widget, text="example")```
B) Create and store a tooltip for later configuration:
1) ```tooltip = Tip.create(widget, text="example")```
2) ```tooltip.config(text="Example!")```
# 💡 Parameters
`widget` : `tkinter.Widget`
- The widget to attach the tooltip to
`text` : `str, optional`
- Tooltip text (default is an empty string)
`delay` : `int, optional`
- Delay before showing the tooltip in milliseconds (default is `0`)
`padx` : `int, optional`
- X-offset of the tooltip from the origin (default is `0`)
`pady` : `int, optional`
- Y-offset of the tooltip from the origin (default is `0`)
`ipadx` : `int, optional`
- Horizontal internal padding (default is `0`)
`ipady` : `int, optional`
- Vertical internal padding (default is `0`)
`state` : `str, optional`
- Tooltip state, "normal" or "disabled" (default is `None`)
`bg` : str, `optional`
- Background color (default is `"#ffffee"`)
`fg` : str, `optional`
- Foreground (text) color (default is `"black"`)
`font` : `tuple, optional`
- Font of the text (default is `("TkDefaultFont", 8, "normal")`)
`borderwidth` : `int, optional`
- Border width (default is `1`)
`relief` : `str, optional`
- Border style (default is `"solid"`)
`justify` : `str, optional`
- Text justification (default is `"center"`)
`wraplength` : `int, optional`
- Maximum line width for text wrapping (default is `0`, which disables wrapping)
`fade_in` : `int, optional`
- Fade-in time in milliseconds (default is `125`)
`fade_out` : `int, optional`
- Fade-out time in milliseconds (default is `50`)
`origin` : `str, optional`
- Origin point of the tooltip, `"mouse"` or `"widget"` (default is `"mouse"`)