Reputation: 303
I tried to use tktable package to create table and show my data. However, I could not make it work.
import Tkinter
import tktable
root = Tkinter.Tk()
table = tktable.Table(root, rows=10, cols=4)
table.pack(side="top", fill="both", expand=True)
root.mainloop()
I got error like:
Traceback (most recent call last):
File "C:/Users/jgou/PycharmProjects/mmt-autobench/autobench/test/test.py",
line 520, in <module> table = Table(root, rows=10, cols=4)
File "C:\Users\jgou\PycharmProjects\mmtautobench\autobench\inst\tktable.py",
line 135, in __init__tkinter.Widget.__init__(self, master, 'table', kw)
File "C:\Users\jgou\AppData\Local\Continuum\Anaconda2\lib\libtk\Tkinter.py",
line 2096, in __init__(widgetName, self._w) + extra + self._options(cnf))
_tkinter.TclError: invalid command name "table"
I searched online and could you solve the issue, please suggest and help. It made me crazy. It should be very easy. Thank you very much.
Upvotes: 0
Views: 267