A Tkinter tooltip widget that always stays on top.
Project description
Creates a tooltip that will be displayed on top of all windows.
The tooltip will be attached to the assigned Tkinter widget and follow the mouse as long as mouse stays within widget boundaries.
Standard definition
The minimum definition of the tooltip uses these parameters:
- widget - The widget to attach the tooltip to
- msg - The text to display
Styling and definition
Additionaly these parameters can be used for more styling.
Display parameters
- delay - Time to wait (in milliseconds) for the tooltip to be displayed
- borderstyle - How is the border to be styled. Available values
-
solid [Default]
-
flat
-
raised
-
sunken
-
groove
-
ridge
-
groove, ridge, sunken, raised will need a border width of at least 3 to be visual. If borderwidth is not defined, or less than 3, it will be automatically adjusted.
-
- borderwidth - Width of the border. Defaults to 1.
- stationary - If set, the tooltip will be stationary, otherwise the tooltip will follow the mouses movements
- blink - Settings for how the tooltip should blink. Defaults to not blink. Available parameters:
- enabled: Boolean to set if blinking is enabled
- interval: Time in milliseconds between blink updates
- mode: In what way should the blinking be visible. Available values:
- 'solid' [Default] The blinking will toggle between visible and not visible
- 'opacity' The blinking will have a fading effect
- min_alpha: Minimum opacity for 'opacity' mode
- max_alpha: Maximum opacity for 'opacity' mode
- step: Change in opacity per blink for 'opacity' mode
- duration: Time in milliseconds after which blinking stops. When stopped, the tooltip will stay visible
Visual parameters
- bg - Background color of the tooltip
- font - Font for the text of the tooltip
- wraplength - At what length should the text be wrapped. This in effect also affects max width of the tooltip
Reconfigure
With the function '.config()' the tooltip can be reconfigured. Values that can be reconfigured:
- new_text (str): The new text in the tooltip
- new_bg (str): Color for the background
- new_font (tuble(str, int)): The font used for the text, (, )
- new_relief (str): Borderstyle, must be one of 'solid', 'flat', 'raised', 'sunken', 'groove', 'ridge'
- new_borderwidth (int): New width of border
- new_wraplength (int): New character wraplength, this is the maximum length of text before it gets wraped to a new line
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file alwaysontop_tooltip-1.3.tar.gz.
File metadata
- Download URL: alwaysontop_tooltip-1.3.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
49930e49d6ea4ec2687b19c8b3ca07c7589983b36ffb1319b6749afa0e4af328
|
|
| MD5 |
46f41221fdd960deea4d4695f478fea5
|
|
| BLAKE2b-256 |
7d16fca116b2bdf08eabe55eaa6408b2a352315d46ab179cd69254676c1aa3cc
|
File details
Details for the file alwaysontop_tooltip-1.3-py3-none-any.whl.
File metadata
- Download URL: alwaysontop_tooltip-1.3-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
61588341c25d0a3bcb215ffc6912bedb823f6e4c212dddec7f7e66091853fa56
|
|
| MD5 |
977c37ebdedbfd751849d4e0da68637d
|
|
| BLAKE2b-256 |
ddded86a63b6fca01d97cf1ea6c544d7c8af1879ae4e1a46e37f4bc19b13e955
|