Tk Tablelist embedded window

- - latias100 at
Sat Feb 5 02:56:56 CET 2011

I have some really Tcl code which I would like to run in Python:

package require Tk
package require Tablelist
proc main {} {
tablelist::tablelist .t -columns {0 Test} -stretch 1
.t insert end {{} {}}
.t cellconfigure end,0 -window {createWindow}
.t insert end {{} {}}
.t cellconfigure end,0 -window {createWindow}
pack .t -side top -fill both -expand true
proc createWindow {t row col path} {
set width [.t columnwidth 0 -total]
button $path -width $width

This is what I have in Python:

from Tkinter import *
import tktablelist
def createWindow(t,row,col,path):
    b = Button(path)
def main():
    t = tktablelist.TableList(root,columns = (0,' '))
    t.insert(END, (None, None))
root = Tk()

I get an error because I don't know how to format the "window" for
createWindow. What should I do to embed the button in the Tablelist?
I am using the Tablelist wrapper from this website:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list