Closed raff2145 closed 1 year ago
@raff2145
import customtkinter
from CTkTable import *
root = customtkinter.CTk()
def show(cell):
print("row:", cell["row"])
print("column:", cell["column"])
print("value:", cell["value"])
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],]
frame = customtkinter.CTkFrame(root)
frame.pack(expand=True, fill="both")
table = CTkTable(master=frame, row=5, column=5, values=value, height=100, command=show)
table.pack(expand=True, fill="both", padx=20, pady=20)
root.mainloop()
Thanks again for the quick reply. For some reason attempting to configure the command with self.table.configure(command=......) doesn't work, but passing the command parameter to the table instance as you've done does work. Good enough for my needs!
Can you provide an example of how to use the command attribute in table config to get the row/column/value?