TKinter, Entry objects and dynamic naming
Ian Vincent
i_vincent at hotmail.com
Tue Sep 13 05:44:48 EDT 2005
Ian Vincent <i_vincent at hotmail.com> wrote in
news:Xns96D05B2832C99ivincenthotmailcom at 10.15.188.42:
>
> I have looked at using a dictionary but I cannot get my head around
> how to do that either.
I have tried this now but the Entry field just does not seem to work:
def add_variable(self, root, varname):
Label(root, text=varname + ': ').grid(row=self.row, column=0,
sticky=E)
self.properties[varname] = StringVar()
value = Entry(root, relief=SUNKEN, justify=LEFT,
textvariable=self.properties[varname])
value.grid(row=self.row, column=1, sticky=E+W)
self.row = self.row + 1
return value
Confused. :-(
More information about the Python-list
mailing list