[Tutor] Grey out a frame?
Kent Johnson
kent_johnson at skillsoft.com
Thu Aug 26 19:34:51 CEST 2004
Yes, most gui frameworks support enabling and disabling controls. In
Tkinter, you use the 'state' option:
>>> from Tkinter import *
>>> b=Button(text='ok')
>>> b.pack()
>>> b.cget('state')
'normal'
# Normal button state
>>> b.config(state=DISABLED)
# button draws greyed out and doesn't respond to events
>>> b.config(state=NORMAL)
# back to normal
Kent
At 06:44 PM 8/26/2004 +0200, Klas Marteleur wrote:
>Hi again
>is it possible to "grey out" a frame in a gui, or is it possible to grey out
>other widgets like buttons, labels, entrys etc?
>
>Kind regards Klas
>_______________________________________________
>Tutor maillist - Tutor at python.org
>http://mail.python.org/mailman/listinfo/tutor
More information about the Tutor
mailing list