Alan, Thanks so much.
Is the below the standard way of checking the content of Label in "if" statement? root = Tk() label = Label(root , text = "pure") if label["pure"] == "pure": Regards, Emeka On Wed, Feb 16, 2011 at 10:13 AM, Alan Gauld <alan.ga...@btinternet.com>wrote: > > "Emeka" <emekami...@gmail.com> wrote > > in order to change "text" , I could do the this >> >> label[text] = "pool" >> >> I do know that there is something like this.. >> >> label.configure(text = "pool") >> > > For singlealue changes it's largely a matter of taste but I personally use > the dictionary form for a single value change and configure() where I am > changing multiple values at the same time. (Otherwise I'd need to have > multiple lines changing one value each...) > > Thus, if the new label were very long and you wanted to change the width of > the control to accomodate it you could do > > label.configure(text='a very long message indeed', width=50) > > HTH, > > -- > Alan Gauld > Author of the Learn to Program web site > http://www.alan-g.me.uk/ > > > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > http://mail.python.org/mailman/listinfo/tutor > -- *Satajanus Nig. Ltd *
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor