Tkinter variables
Ulf Engstrøm
b2blink at hotmail.com
Tue Dec 21 14:07:22 EST 1999
Hello again :)
I'm creating an app in Tkinter and I got stuck where I wanted to add a
number of checkbuttons.
I want them to be like:
c0 = Checkbutton(root,text=name0,onvalue=name0,offvalue='',variable=var)
c0.grid(row=0)
c1 = Checkbutton(root,text=name1,onvalue=name1,offvalue='',variable=var)
c1.grid(row=1)
for any number of names that I get from a database, how do I get the "c0",
"c1" and so on for this? Text and values are no problems.
what came to mind was the eval from JavaScript, is there such a function?
for name, num in myClass.names,range(len(myClass.names)):
eval("c"+num) =
Anyone has any good hints?
Regards
Ulf Engstrøm
http://www.b2b-link.com
ulf.engstrom at b2b-link.com
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
More information about the Python-list
mailing list