Skip to main content

Customtkinter Table widget

Project description

CTkTable

Here is a quick and simple table widget having all the basic features.

Screenshot

Features:

  • Add columns/rows
  • Delete columns/rows
  • Edit rows/columns at once
  • Insert values to specific cell
  • delete values from specific cell
  • update all values at once
  • edit each cell value and options
  • entry editing
  • can be used with scrollable frame

Installation

pip install CTkTable

GitHub repo size

Usage

import customtkinter
from CTkTable import *

root = customtkinter.CTk()

value = [[1,2,3,4,5],
         [1,2,3,4,5],
         [1,2,3,4,5],
         [1,2,3,4,5],
         [1,2,3,4,5]]

table = CTkTable(master=root, row=5, column=5, values=value)
table.pack(expand=True, fill="both", padx=20, pady=20)

root.mainloop()

Methods

  • .add_row(index, values)
  • .add_column(index, values)
  • .edit_row(row_num, *args): edit one full row at once
  • .edit_column(column_num, *args): edit one full column at once
  • .delete_row(index)
  • .delete_column(index)
  • .update_values(values): update all values at once
  • .insert(row, column, value, *args): change specific index data
  • .delete(row, column, *args): delete the data from specific index
  • .get(): get all values
  • .configure(arguments): change other table attributes

here, args means ctkbutton parameters which can also be passed

Note: treat all the table cells as a ctkbutton class

Arguments

Parameter Description
master parent widget
values the default values for table
row optional, set number of default rows
column optional, set number of default columns
padx add internal padding in x
pady add internal padding in y
colors set two fg_colors for the table (list), eg: colors=["yellow", "green"]
color_phase set color phase based on rows or columns, eg: color_phase="vertical"
header_color define the topmost row color
corner_radius define the corner roundness of the table
hover_color enable hover effect on the cells
command specify a command when a table cell is pressed, [returns row, column, value]
*other button parameters all other ctk button parameters can be passed

Note: This library is at early stage so there can be some performance issues.

Thanks for visiting! Hope it will help :)

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

CTkTable-0.6.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

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

CTkTable-0.6-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file CTkTable-0.6.tar.gz.

File metadata

  • Download URL: CTkTable-0.6.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for CTkTable-0.6.tar.gz
Algorithm Hash digest
SHA256 b95fde6bd050fab4ae0e0105110fd698be03913981c78d2cc247b346d507e9cc
MD5 95cc48a5631d2b915423a5a04a7445df
BLAKE2b-256 599513b6045b52dba3286fb7c4af70e97a2f42f0be087f6f446d89ff35ecf99d

See more details on using hashes here.

File details

Details for the file CTkTable-0.6-py3-none-any.whl.

File metadata

  • Download URL: CTkTable-0.6-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for CTkTable-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 b0c5df9692f0f43d6371240c81a67b8851afc891022cf25918916ad6ae65353d
MD5 9e225c749f6c489499a94d12a22d1fe2
BLAKE2b-256 9837258910a604c575e3b122949cf0c24e444845867410e484793b78edd7f118

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