Tkinter Query

newt_e at blueyonder.co.uk newt_e at blueyonder.co.uk
Thu Oct 10 02:45:03 EDT 2002


Doh, sometimes it's so obvious it stares you in the face.

What I'm really trying to do is similar to 

  lbls=[]
  for i in [1,2,3,4,5]
    lbl = Label(parent, text="Some Text")
    lbls.append(lbl)

  lbls[3].configure(text="New Text")

Does lbls.append(lbl) only create a reference to lbl, and would this make lbls[3].configure(text="New Text")
 a nonsense? If so how do I get the actual value of lbl into the lbls list?

Thanks,

Newt







More information about the Python-list mailing list