Skip to main content

Simple and beginner-friendly table widget for Tkinter

Project description

The simplest way to create tables in Tkinter for beginners :)


✨ Features

  • Easy to use
  • Insert rows or dictionaries
  • Column sorting
  • Alternating row colors
  • Scrollable table

📦 Installation

pip install tkable

🚀 Quick Example

from tkable import DataTable
import tkinter as tk

root = tk.Tk()

table = DataTable(root, ["Name", "Age", "City"])

table.load_data([
    ["Person 1", 20, "City 1"],
    ["Person 2", 22, "City 2"]
])

root.mainloop()

📸 Result

Result Screenshot


🔧 Customization Options

Parameter Type Default Description
header_bg str #2c3e50 Header background color
header_fg str white Header text color
row_height int 28 Height of each row
font tuple ("Segoe UI", 10) Font used in the table
alternating_colors tuple ("#ffffff", "#f5f5f5") Row background colors

📦 API Reference

insert_row(*values)

Add a new row to the table.

table.insert_row("Person Name", 20, "City")

insert_dict(data: dict)

Insert a row using a dictionary.

table.insert_dict({
    "Name": "Person Name",
    "Age": 22,
    "City": "City"
})

load_data(data)

Load multiple rows.

table.load_data([
    ["Person 1", 20],
    ["Person 2", 22]
])

clear()

Remove all rows.

table.clear()

get_selected_row()

Return selected row as dictionary.

selected = table.get_selected_row()

💡 Tip: Use insert_dict() when working with forms for cleaner code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tkable-1.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tkable-1.0.2-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file tkable-1.0.2.tar.gz.

File metadata

  • Download URL: tkable-1.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tkable-1.0.2.tar.gz
Algorithm Hash digest
SHA256 cc9c586f6c1da0be0c3947258cbf59d4b00d46bbc749341d8eeabe465dc1b6b3
MD5 24e15d706c4d160782eaf15c1d4d245b
BLAKE2b-256 71a862c30d0f308644eb7f781d44cd25ff35aa81d29d6612aa946f802a666823

See more details on using hashes here.

File details

Details for the file tkable-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: tkable-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.0

File hashes

Hashes for tkable-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 28d16763650b42aed7428b0a39863815088d9264d49781b7f6cd919c277ca0ba
MD5 c9cc1706311372b4db4f82dbe1ca4c46
BLAKE2b-256 d6f78c8b2ce403e879994280a099bf7fe3b67534b21b84ea695032b4153c1df7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page