Honestly, I’m still having trouble figuring out how to make the Tktable component for Tkinter work like a spreadsheet in the Tkinter application I’m developing, but I found some interesting information that might make what I had to go through to get to this point easier for someone else in my shoes. I might just end up dynamically creating Entry
components, but I’d rather get this working.
You need four files to get Tktable working:
They go into Python folder like so:
C:\Python2.x
| +--- tcl |
| | +--- Tktable2.7
| | | +--- pkgIndex.tcl
| +--- Tktable.dll
| +--- tkTable.tcl
|
| +--- Lib
| +--- lib-tk
| +--- tktable.py
You can get the first three files from the Win32 binary distribution of Tktable 2.7 the tktable.py is a python wrapper for the component and can only be found the demos folder of the newest edition of the source code found here: Tktable 2.9 Source
Once you’ve gotten all the files in the right place you should be able to setup a Python script to use the table. You could also just run the tktable.py file through the interpreter to make it it works. Click the “read more” link to see my modified version of that code (the old test code it ships with seems to be a little broken in spots)