Tkinter Query

Newt newt_e at blueyonder.co.uk
Thu Oct 10 18:06:10 EDT 2002


"Newt" <newt_e at blueyonder.co.uk> wrote in message
news:mailman.1034270595.23815.python-list at python.org...
> Ah, but that would mean that spinbox isn't part of the standard Tk
interface
> (at the moment).
>
> If I use:
>
> lbls = []
> for i in [1,2,3,4,5]
>   lbl = Label[parent, text="Some text"]
>   lbls.append(lbl)
>
> lbls[3].configure(text="New text")
>
> would this work?  Does the lbls list contain the actual lbl objects, or
does
> it contain references to them. In either case, have I got the sysntax
right
> and if not  would do I need to do?
>
> TIA
>
> Newt
> >
It seems to work if I run it interactively from within Python. However, if I
move it into a code modules (into a class) and start to use self.lbls
insteaf of lbl then it doesn't work. Does anyone have any ideas as to what
is going on?

Newt





More information about the Python-list mailing list