{"id":17360976,"url":"https://github.com/gnikit/tkinter-tooltip","last_synced_at":"2025-04-05T18:05:52.213Z","repository":{"id":38210730,"uuid":"421552997","full_name":"gnikit/tkinter-tooltip","owner":"gnikit","description":"A ToolTip widget for tkinter","archived":false,"fork":false,"pushed_at":"2025-03-03T17:09:42.000Z","size":4197,"stargazers_count":43,"open_issues_count":7,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T17:12:53.899Z","etag":null,"topics":["dark-theme","gui","python","tkinter","tooltip"],"latest_commit_sha":null,"homepage":"https://gnikit.github.io/tkinter-tooltip","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gnikit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["gnikit"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":["https://paypal.me/inikit"]}},"created_at":"2021-10-26T19:10:12.000Z","updated_at":"2025-02-21T21:19:26.000Z","dependencies_parsed_at":"2023-02-16T11:01:05.350Z","dependency_job_id":"be30e1af-3f85-485a-888c-95676b5107fe","html_url":"https://github.com/gnikit/tkinter-tooltip","commit_stats":{"total_commits":139,"total_committers":4,"mean_commits":34.75,"dds":"0.37410071942446044","last_synced_commit":"ee8df977ed6408e9e41d317596db5b35716c1edc"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2Ftkinter-tooltip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2Ftkinter-tooltip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2Ftkinter-tooltip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gnikit%2Ftkinter-tooltip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gnikit","download_url":"https://codeload.github.com/gnikit/tkinter-tooltip/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378140,"owners_count":20929296,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dark-theme","gui","python","tkinter","tooltip"],"created_at":"2024-10-15T19:29:26.116Z","updated_at":"2025-04-05T18:05:52.192Z","avatar_url":"https://github.com/gnikit.png","language":"Python","funding_links":["https://github.com/sponsors/gnikit","https://paypal.me/inikit"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n[![Downloads](https://pepy.tech/badge/tkinter-tooltip)](https://pepy.tech/project/tkinter-tooltip)\n[![PyPI Latest Release](https://img.shields.io/pypi/v/tkinter-tooltip.svg)](https://pypi.org/project/tkinter-tooltip/)\n[![Tests](https://github.com/gnikit/tkinter-tooltip/actions/workflows/main.yml/badge.svg)](https://github.com/gnikit/tkinter-tooltip/actions/workflows/main.yml)\n[![Documentation](https://github.com/gnikit/tkinter-tooltip/actions/workflows/docs.yml/badge.svg)](https://github.com/gnikit/tkinter-tooltip/actions/workflows/docs.yml)\n[![codecov](https://codecov.io/gh/gnikit/tkinter-tooltip/graph/badge.svg?token=D911RWCBZ5)](https://codecov.io/gh/gnikit/tkinter-tooltip)\n[![PyPI - License](https://img.shields.io/pypi/l/tkinter-tooltip)](https://github.com/gnikit/tkinter-tooltip/blob/master/LICENSE)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n\u003c!-- [![CodeFactor](https://www.codefactor.io/repository/github/gnikit/tkinter-tooltip/badge)](https://www.codefactor.io/repository/github/gnikit/tkinter-tooltip) --\u003e\n\n\u003c/div\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![GitHub Sponsor](https://img.shields.io/static/v1?style=social\u0026label=Sponsor\u0026message=%E2%9D%A4\u0026logo=GitHub\u0026color\u0026link=%3Curl%3E)](https://github.com/sponsors/gnikit)\n[![PyaPal](https://img.shields.io/static/v1?style=social\u0026label=Donate\u0026message=%E2%9D%A4\u0026logo=Paypal\u0026color\u0026link=%3Curl%3E)](https://paypal.me/inikit)\n\n\u003c/div\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/images/tooltip_logo.svg\" /\u003e\n\u003c/p\u003e\n\n# tkinter-tooltip\n\n## What this is\n\nThis is a simple yet fully customisable tooltip/pop-up implementation for\n`tkinter` widgets. It is capable of fully integrating with custom `tkinter`\nthemes both light and dark ones.\n\n![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/images/header.png)\n\n## Features\n\n- normal tooltips\n- show tooltip with `s` seconds `delay`\n- tooltip tracks mouse cursor\n- tooltip displays strings and string returning functions\n- fully customisable, tooltip inherits underlying theme style\n\n## Install\n\n```shell\npip install tkinter-tooltip\n```\n\n## Examples\n\n### Normal tooltips\n\nBy default the tooltip activates when entering and/or moving in the widget are\nand deactivates when leaving and/or pressing any button.\n\n![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/images/tootil-simple.png)\n\n```python\nimport tkinter as tk\nimport tkinter.ttk as ttk\nfrom tktooltip import ToolTip\n\napp = tk.Tk()\nb = ttk.Button(app, text=\"Button\")\nb.pack()\nToolTip(b, msg=\"Hover info\")\napp.mainloop()\n```\n\n### Delayed tooltip\n\n![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tooltip-delayed.gif)\n\n```python\nimport tkinter as tk\nimport tkinter.ttk as ttk\nfrom tktooltip import ToolTip\n\napp = tk.Tk()\nb = ttk.Button(app, text=\"Button\")\nb.pack()\nToolTip(b, msg=\"Hover info\", delay=2.0)   # True by default\napp.mainloop()\n```\n\n### Tracking tooltip\n\nHave the tooltip follow the mousse cursor around when moving.\n\n![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tooltip-tracking.gif)\n\n```python\nimport tkinter as tk\nimport tkinter.ttk as ttk\nfrom tktooltip import ToolTip\n\napp = tk.Tk()\nb = ttk.Button(app, text=\"Button\")\nb.pack()\nToolTip(b, msg=\"Hover info\", follow=True)   # True by default\napp.mainloop()\n```\n\n### Function as tooltip\n\nHere the tooltip returns the value of `time.asctime()` which updates with every\nmovement. You can control the refresh rate of the `ToolTip` through the `refresh`\nargument by default it is set to `1s`.\n\n![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-function-refresh.gif)\n![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-function.gif)\n\n```python\nimport time\nimport tkinter as tk\nimport tkinter.ttk as ttk\nfrom tktooltip import ToolTip\n\napp = tk.Tk()\nb = ttk.Button(app, text=\"Button\")\nb.pack()\n# NOTE: pass the function itself not the return value\nToolTip(b, msg=time.asctime, delay=0)\napp.mainloop()\n```\n\n### Themed tooltip\n\n`tkinter-tooltip` is fully aware of the underlying theme (in this case a dark theme),\nand can even be furher customised by passing `tk` styling arguments to the tooltip\n\n![alt](https://raw.githubusercontent.com/gnikit/tkinter-tooltip/master/assets/animations/tootip-dark-theme.gif)\n\nStyle tooltip and underlying the button. If a full theme has been used then\nthe `ToolTip` will inherit the settings of the theme by default.\n\n```python\nimport tkinter as tk\nimport tkinter.ttk as ttk\nfrom tktooltip import ToolTip\n\napp = tk.Tk()\ns = ttk.Style()\ns.configure(\"custom.TButton\", foreground=\"#ffffff\", background=\"#1c1c1c\")\nb = ttk.Button(app, text=\"Button\", style=\"custom.TButton\")\nb.pack()\nToolTip(b, msg=\"Hover info\", delay=0,\n        parent_kwargs={\"bg\": \"black\", \"padx\": 5, \"pady\": 5},\n        fg=\"#ffffff\", bg=\"#1c1c1c\", padx=10, pady=10)\napp.mainloop()\n```\n\n## Notes\n\n- Certain options do not match great with each other, a good example is `follow`\n  and `delay` using small x/y offsets. This can cause the tooltip to appear\n  inside the widget. Hovering over the tooltip will cause it to disappear and\n  reappear, in a new position, potentially again inside the widget.\n\n## Contributing\n\nYou can find the instructions on how to contribute in this project in the\n[CONTRIBUTING.md](CONTRIBUTING.md) file.\n\n## Acknowledgements\n\n`tkinter-tooltip` is based on the original work performed by\n[Tucker Beck](http://code.activestate.com/recipes/576688-tooltip-for-tkinter/)\nlicensed under an MIT License.\n\n## License\n\n[MIT](LICENSE) License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnikit%2Ftkinter-tooltip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgnikit%2Ftkinter-tooltip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgnikit%2Ftkinter-tooltip/lists"}