destroy(n)
destroy(n) β Tk Built-In Commands π
okay so this is a Tk Built-In Commands page, and it's literally about deleting windows. bestie, it's the cleanup arc and it ate β no cap π
πΈ NAME πΈ
destroy β Destroy one or more windows
β¨ SYNOPSIS β¨
destroy ?window window ...?
π¦ DESCRIPTION π¦
so destroy deletes the windows you give it as the window arguments, plus all of their descendants β the whole window family tree, no survivors, periodt π.
If the window . is deleted, then all windows will be destroyed and the application will (normally) exit. that's iconic for cleanup and also your app is leaving the chat π.
The windows are destroyed in order. If an error occurs while destroying a window, the command aborts right there and does not destroy the remaining windows. And if a window does not exist? No error is returned β it's lowkey fine π«Ά.
π EXAMPLE π
Destroy all checkbuttons that are direct children of the given widget:
proc killCheckbuttonChildren {parent} {
foreach w [winfo children $parent] {
if {[winfo class $w] eq "Checkbutton"} {
destroy $w
}
}
}
π KEYWORDS π
applicationdestroywindow
sign-off bestie: source/version is Tk, page is destroy(n), and the footer has no date listed β so no invented date, just vibes β¨ππ«Ά
π¦ where this page comes from
- alpine 3.22: tk-doc 8.6.16-r0 Β· TCL
- alpine 3.23: tk-doc 8.6.17-r0 Β· TCL
- alpine 3.23: tk9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tk-doc 8.6.17-r1 Β· TCL
- alpine 3.24: tk9-doc 9.0.3-r2 Β· TCL
- arch rolling: tk 8.6.16-1 Β· TCL
- centos-stream 10: tk 1:8.6.13-5.el10 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 43: tk 1:9.0.2-1.fc43 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- fedora 44: tk 1:9.0.2-1.fc44 Β· TCL AND HPND-Pbmplus AND CC-BY-SA-3.0 AND MIT-open-group AND MIT
- nixos 26.05: tk 9.0.3
- nixpkgs unstable: tk 9.1.0
- opensuse-leap 16.0: tk 8.6.13-160000.2.2 Β· TCL
- opensuse-leap 16.0: tk 8.6.13-160000.2.2 Β· TCL
- opensuse-leap 16.0: tk 8.6.13-160000.2.2 Β· TCL
- opensuse-leap 16.0: tk 8.6.13-160000.2.2 Β· TCL
- Copyright (c) 1990 The Regents of the University of California
- Copyright (c) 1994-1996 Sun Microsystems, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms