I'm having trouble following the TkTable docs at how to insert predefined values into a TkTable for Tkinter GUI. Docs: https://www.eso.org/projects/vlt/sw-dev/tcl8.3.3/tktable2.7/tkTable.html
I researched into this and I have been unable to find a suitable answer documented anywhere for how to insert predefined values into a TkTable... this is an unanswered question I found: set value into tktable
Does anyone know how this is done?
Here is my example code derived from the example provided after downloading TkTable (I can set 1 dog into the table, but I have no idea how to use the set method to iterate over the list successfully to insert one cell after the other):
import tkinter as tk
import tktable
def table_test():
#### DEFINES THE GUI ####
master = tk.Tk()
master.geometry('800x800+250+200')
master.title('Dogs')
#### SETS THE DOG INTO THE TABLE ####
def callback_dogs(event):
values = ['Doodle','Pug','Westie','Poodle']
for item in values:
return item
#### DEFINING THE TKTABLE ####
tb = tktable.Table(master, state='disabled', width=15, titlerows=1, rows=3, cols=2, command=callback_dogs)
tb.pack(expand=1)
#### MAINLOOPING ####
master.attributes('-topmost',True)
master.after_idle(master.attributes,'-topmost',False)
tk.mainloop()
table_test()