470,616 Members | 2,149 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,616 developers. It's quick & easy.

Tkinter and TableList - Configure the Temporary Embedded Widgets

I actually post a topic relating to my problem here:

thread/a073d532c4481bfe?hl=en# )

But I thought it could be useful to place an example of my problem
here aswell. This a small piece of testcode that creates a TableList.
When the cell is selected, a ComboBox Widget is used temporarily
during the editing phase. It is during this ( EditStartCmd call) that
I wish to configure the "values" of the Widget. My question is, ""How
do I do this ?""

The code below returns the error when the cell is selected. :

Traceback (most recent call last):
File "D:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
return self.func(*args)
File "D:\PythonWS\TEW Test.py", line 34, in EditStartCmd
TEW.configure(values=("This","Is","A","Test")) # Here I "try" to
configure the Temporary Widget
AttributeError: '_tkinter.Tcl_Obj' object has no attribute 'configure'

I has also provided a normal bwidget combox box ( which I use for the
Temporary Embedded Widget). It shows the normal method of configuring
the "values" is working, just the method I assume for embedded ones it

Anyone who has experience in Tkinter & Tablelist would really help me
here. It could be something really silly that I do not appreciate and
any clues would really help!

This will also be posted on http://mail.python.org/mailman/listinfo/tkinter-discuss


import Tkinter
import bwidget
import tktablelist

root = Tkinter.Tk()
TestFr = Tkinter.Frame(root)
TestBox = bwidget.ComboBox(root)
TestBox.configure( values = ("1","two","4rer"))

class TableBuilder:
def __init__(self, Frame, Titles):
stretch = "all",

def BuildTable(self,Titles):
I = 0
for Title in Titles:
self.Table.insertcolumns("end", 0, Title)
I +=1
for row in range(10):
self.Table.rowconfigure("end", text=(row,row+1,row*row))

def EditStartCmd(self, table, row, col, text):
TEW = self.Table.editwinpath() # Here I
return the Temporary Widget pathname
TEW.configure(values=("This","Is","A","Test")) # Configure
the Temp Widget - This is wrong! what is right?

Test = TableBuilder(TestFr,['A','B','C'])
TestBox = bwidget.ComboBox(root)
TestBox.configure( text=" This Works!", values = ("1","two","4rer"))
Aug 19 '08 #1
0 1620

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by max(01)* | last post: by
3 posts views Thread by Peter Moscatt | last post: by
8 posts views Thread by Dustan | last post: by
reply views Thread by Kevin Walzer | last post: by
44 posts views Thread by bg_ie | last post: by
8 posts views Thread by Lie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.