Skip to main content

Hinted Text

Hinted text widget for tkinter.

This custom HintedText class inherits from tk.Text and adds a hint parameter in the constructor. The clear_hint method is bound to the <FocusIn> event and will clear the hint text if the widget has focus and the text is the same as the hint. The add_hint method is bound to the <FocusOut> event and will add the hint text back if the widget loses focus and the text is empty.

Installation

pip install hintedtext

Usage

import tkinter as tk
from hintedtext import HintedText, HintedEntry

root = tk.Tk()
text = HintedText(root, hint="Enter your text here")
text.pack()
entry = HintedEntry(root, hint="Enter your text here")
entry.pack()
root.mainloop()

Metadata

Release files for hintedtext 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hintedtext 0.6.0
File Size Uploaded
hintedtext-0.6.0.tar.gz 2.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hintedtext 0.6.0
File Interpreter ABI Platform
hintedtext-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 5.8 kB

Release files / hintedtext-0.6.0.tar.gz

Download URL hintedtext-0.6.0.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
95655d3ad067c6b50fc58d1ed769f1192c0907a42efd2b0b6be079b9740d54c5
BLAKE2b-256 checksum
How to use checksums
9be16a0e0e40c332ef655d167c764134f7af5886145ab7c18813be14905e527d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.3 Windows/10

Release files / hintedtext-0.6.0-py3-none-any.whl

Download URL hintedtext-0.6.0-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
254272017fa9d0a5e6f0bc2595d0a82dcd34ab82effd2babb4e5f0aacd8cb24c
BLAKE2b-256 checksum
How to use checksums
d16bebab92d0b4ebde10578cb8b4da5776831a12c43adbc65f2e81dc2a3ef539
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.3 Windows/10

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page