March 2003
Intermediate to advanced
656 pages
39h 30m
English
protocol
T.protocol(protocol_name,callable)By calling protocol with a first argument of
'WM_DELETE_WINDOW' (the only meaningful protocol
on most platforms), you install callable
as the handler for attempts by the user to close
T through the window manager (for example
by clicking on the X in the upper right corner on Windows and KDE).
Python then calls callable without
arguments when the user makes such an attempt.
callable itself must call
T
.destroy( ) in order
to close T, otherwise
T stays open. By default, if
T
.protocol has not been
called, such attempts implicitly call
T
.destroy( ) and thus
unconditionally close T.