Sujet : Re: Closing a tclkit
De : JacobLambeth (at) *nospam* clevelandgolf.com (Jacob)
Groupes : comp.lang.tclDate : 25. Jun 2024, 16:14:13
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <373b32ce-a57d-485a-8ac1-cdc20adb56d4@clevelandgolf.com>
References : 1 2
User-Agent : Mozilla Thunderbird
On 6/24/2024 12:19 PM, Robert Heller wrote:
At Mon, 24 Jun 2024 10:49:16 -0700 Jacob <JacobLambeth@clevelandgolf.com> wrote:
>
Hello,
>
I have a program that runs inside a tclkit (windows exe). Whenever I
close the program by clicking the "X", the tclkit still says its running
the task manager. Are there any tips on how to properly close a tclkit?
Right now, I simply have an exit command binded to the window.
>
bind . <Destroy> {
exit
}
>
Thanks,
Try adding:
wm protocol . WM_DELETE_WINDOW ::exit
Note: is "." the only toplevel? Is that in fact the toplevel you are
closing?
Have you done something like this?
wm withdraw .
toplevel .mytoplevelui
>
Jacob
>
Hi Robert,
Thank you for your recommendation. You were right, I had a separate toplevel that was not necessary. Also,
wm protocol . WM_DELETE_WINDOW ::exit
Appears to be the better way than binding exit to the destroy callback.
Thanks,
Jacob