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,
Jacob
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,
Jacob
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
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
bind . <Destroy> {
exit
}
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 493 |
Nodes: | 16 (2 / 14) |
Uptime: | 07:22:59 |
Calls: | 9,710 |
Files: | 13,740 |
Messages: | 6,181,199 |