Placing Tkinter objects in a dictionary
Adonis
deltapigz at telocity.com
Thu Nov 7 00:30:57 EST 2002
I have a loop creating Tkinter objects (an Entry text box) all with the same
name and placing its instance in a dictionary: i.e:
for x in range(10):
myEntry = Entry(frame)
myEntry.grid(row=x, column=0)
someDict['%s'%x] = myEntry
now I have another function which will modify myEntry:
def someFunc(x, data):
someDict[str(x)].config(text=data) # here is my error; the config does
not work;
# no error is raised.
any help is greatly appreciated.
Adonis
More information about the Python-list
mailing list