Skip to main content

tkinterex

A package that adds extension features to tkinter.

Installation

pip install tkinterex

Components

EntryEx

A ttk.Entry subclass that manages its own StringVar internally, exposing a simple value property.

from tkinterex import EntryEx

entry = EntryEx(master)
entry.value = "hello"
print(entry.value)  # "hello"
Member Type Description
value str (property) Get or set the current text value.

CheckbuttonEx

A ttk.Checkbutton subclass that manages its own BooleanVar internally, exposing a simple value property.

from tkinterex import CheckbuttonEx

cb = CheckbuttonEx(master, text="Enable feature")
cb.value = True
print(cb.value)  # True
Member Type Description
value bool (property) Get or set the checked state.

ComboboxEx

A ttk.Combobox subclass that keeps its own StringVar internally, exposing a simple value property.

from tkinterex import ComboboxEx

combo = ComboboxEx(master, values=["Tokyo", "Osaka", "Kyoto"])
combo.value = "Osaka"
print(combo.value)  # "Osaka"
Member Type Description
value str (property) Get or set the selected item text.

TextEx

A tkinter.Text subclass exposing a simple value property for getting and setting the whole text content.

from tkinterex import TextEx

text = TextEx(master, height=5, width=30)
text.value = "hello\nworld"
print(text.value)  # "hello\nworld"
Member Type Description
value str (property) Get or set the entire text content.

ListboxEx

A Frame-based widget that wraps a Listbox with a vertical Scrollbar. All standard Listbox methods are transparently delegated.

from tkinterex import ListboxEx

lb = ListboxEx(master)
lb.insert("end", "item 1")
lb.insert("end", "item 2")

# Get/set selected items by value
print(lb.curselection_list)   # ["item 1"]
lb.curselection_list = ["item 2"]
Member Type Description
listbox Listbox The internal Listbox widget.
scrollbar Scrollbar The internal vertical Scrollbar.
curselection_list list[str] (property) Get or set the selected items by their string values.

show_modal_window

Displays a Toplevel window as a modal dialog, positioned near the parent window and clamped within the screen bounds.

from tkinterex import show_modal_window

dialog = Toplevel(root)
# ... build dialog contents ...
show_modal_window(root, dialog)
# execution resumes here after the dialog is closed
Parameter Type Description
parent Tk The parent window.
modal_window Toplevel The dialog window to display modally.

ConfirmDialog

A modal confirmation dialog with a list of button keys and labels. It returns the selected key from show() and also exposes the same value through .value.

import tkinter as tk
from tkinterex import ConfirmDialog

root = tk.Tk()
root.withdraw()

dlg = ConfirmDialog(
    root,
    message="Choose an action:",
    buttons=[
        ("save", "Save"),
        ("discard", "Discard"),
        ("cancel", "Cancel"),
    ],
)

result = dlg.show()
print(result)  # "save", "discard", "cancel", or None
root.destroy()
Member Type Description
show() str | None Displays the dialog modally and returns the selected key.
value str | None (property) Same value as show().

SelectDialog

A ListWindow-backed selection dialog that hides the internal key-label mapping and exposes a clean data-oriented API.

import tkinter as tk
from tkinterex import SelectDialog

root = tk.Tk()
root.withdraw()

dlg = SelectDialog(
    root,
    title="Select an action",
    items=[
        ("save", "Save file"),
        ("discard", "Discard changes"),
        ("cancel", "Cancel"),
    ],
)

result = dlg.show()
print(result)  # "save", "discard", "cancel", or None
root.destroy()
Member Type Description
show() str | None Displays the selection dialog and returns the selected key.
value str | None (property) Same value as show().

License

MIT

Metadata

Release files for tkinterex 1.1.3

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

Source distribution (sdist)

Source distribution for tkinterex 1.1.3
File Size Uploaded
tkinterex-1.1.3.tar.gz 43.0 kB Details

Built distribution (wheel)

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

Total release size: 49.0 kB

Release files / tkinterex-1.1.3.tar.gz

Download URL tkinterex-1.1.3.tar.gz
Size 43.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9f41caae33a20f21cbd40fa7ad9e1245b8e775c7055a2c509d3204daa84de10e
BLAKE2b-256 checksum
How to use checksums
8648ebeff75531f7920f33a5766909d970f25b09c49d03c96d4213c0d68125fd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / tkinterex-1.1.3-py3-none-any.whl

Download URL tkinterex-1.1.3-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f74e646ebb590e26e87d4471a12db8a77c3233dd0c27d10e7a7c311dfdc42d55
BLAKE2b-256 checksum
How to use checksums
6d8a6abc9714b3f2840ab1ebc9fd926eff57fe22a3b99faa10143f118a41885c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

1.2.1

2 release files

1.2.0

2 release files

This release

1.1.3 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

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