CTkTable
Customtkinter Table widget (extension/add-on)
Install / Use
/learn @Akascape/CTkTableREADME
CTkTable
Here is a quick and simple table widget having all the basic features.

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
- Lots of other data operations
Installation
pip install CTkTable
<img alt="GitHub repo size" src="https://img.shields.io/github/repo-size/Akascape/CTkTable?&color=white&label=Download%20Source%20Code&logo=Python&logoColor=yellow&style=for-the-badge" width="400">
Dont forget to leave a ⭐
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
- .insert(row, column, value, *args): change specific cell index data
- .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): remove one row
- .delete_column(index): remove one column
- .delete_rows(indices): remove mutliple rows
- .delete_columns(indices): remove multiple columns
- .edit(row, column): edit specific cell without changing the value
- .select(row, column): select one cell
- .select_row(row): select a row
- .get_selected_row(): get the values of the selected row
- .deselect_row(row): deselect a row
- .select_column(column): select a column
- .get_selected_column(): get the values of selected column
- .deselect_column(column): deselect a column
- .update_values(values): update all values at once
- .delete(row, column, *args): delete the data from specific index
- .get(): get all values
- .get(row, column): get specific cell value
- .get_row(row): get all values of a specific row
- .get_column(column): get all values of a specific column
- .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" |
| orientation | change the orientation of table, vertical or horizontal |
| header_color | define the topmost row color |
| corner_radius | define the corner roundness of the table |
| hover_color | enable hover effect on the cells |
| wraplength | set the width of cell text |
| justify | anchor the position of the cell text |
| 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 :)
Related Skills
node-connect
345.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
106.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
345.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
345.9kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
