March 2003
Intermediate to advanced
656 pages
39h 30m
English
withdraw
T.withdraw( )Makes T invisible.
The following example shows a root window with an
Entry widget that lets the user edit the
window’s title and buttons to perform various root
window operations.
import Tkinter root = Tkinter.Tk( ) var = Tkinter.StringVar( ) entry = Tkinter.Entry(root, textvariable=var) entry.focus_set( ) entry.pack( ) var.set(root.title( )) def changeTitle( ): root.title(var.get( )) Tkinter.Button(root, text="Change Title", command=changeTitle).pack( ) Tkinter.Button(root, text="Iconify", command=root.iconify).pack( ) Tkinter.Button(root, text="Close", command=root.destroy).pack( ) Tkinter.mainloop( )
Read now
Unlock full access