[Tutor] All Entry Boxes taking the same value
Alan Gauld
alan.gauld at yahoo.co.uk
Fri Mar 31 06:28:36 EDT 2017
On 30/03/17 21:35, Pooja Bhalode wrote:
> *However, when I execute it, and type something in one entrybox, it shows
> in all the entry boxes using multi-cursor option. *
I'm not sure whats going on and don;t habe tome to experiment but one
thing I noticed:
> average = [" ", " ", " "]
> lowest = [" ", " ", " "]
> highest = [" ", " ", " "]
...
> for i in range(len(reactants)):
> *Entry*(root, textvariable =* average[i]*, width = 15,
> state=DISABLED).grid(row = 3+i, column = 1, sticky = W)
You are setting textvariable to a string but it should be
a StrinVar object. You could probably fix that by changing
your data definitions to StringVars:
average = [StringVar(), StringVar(), StringVar()]
I don't know if that will fix the problem but its probably
a good thing to do anyhow...
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list