On Thu, 03 Feb 2005 17:08:56 -0000, herrington_john <
jdherrin@...> wrote:
> I was wondering if there were a way to execute a command upon closing
> a window. It's clear to me how a procedure could get executed in
> conjuntion with the destroy command; what I haven't been able to
> figure out is how to have a command executed when a user kills a
> window by clicking the "X" in the upper right-hand corner. Is there a
> way to bind a command to that particular way of closing a window? I
> apologize if this question is better posed to another list, perhaps
> related to wish or tcl/tk - it isn't always clear to me what the
> boundaries are between these. Thanks - John
It is a window manager command, part of Tk. You do:
wm protocol WM_DELETE_WINDOW "whatever you wanna do"
Carlos