destroy(3tk)
π destroy(3tk) β Tk Built-In Commands π
okay bestie, pull up a chair, we're talking about destroy from the Tk built-in commands, and honestly? it's giving main character energy π
β¨ NAME β¨
destroy β Destroy one or more windows π
πΈ SYNOPSIS πΈ
destroy ?window window ...?
π¦ DESCRIPTION π¦
so here's the vibe: destroy deletes the windows you hand it in the window arguments, plus literally all of their descendants. the whole family tree. gone. π
and listen β if the window "." gets deleted, then every single window is destroyed and the application will (normally) exit. that's the whole app. that's it. that's the finale. π
the windows get destroyed in order, okay? one by one, in the order you listed them. and if an error pops off while destroying one of them, the command aborts right there β no destroying the remaining windows. nope. it just stops. π
no error is returned if the window doesn't exist, though. she's unbothered. she's not gonna yell at you for a window that was never there. π«Ά
β EXAMPLE β
destroy all checkbuttons that are direct children of the given widget β here's the lil proc for it:
proc killCheckbuttonChildren {parent} {
foreach w [winfo children $parent] {
if {[winfo class $w] eq "Checkbutton"} {
destroy $w
}
}
}
look at her go. iconic behaviour fr fr π
π₯ KEYWORDS π₯
application, destroy, window
and that's the whole page, bestie!! this one came straight out of the Tk built-in commands manual, page destroy(3tk) β mwah π
π¦ where this page comes from
- debian bookworm: tk8.6-doc 8.6.13-2
- debian trixie: tk8.6-doc 8.6.16-1
- debian trixie: tk9.0-doc 9.0.1-3
- ubuntu jammy: tk8.6-doc 8.6.12-1build1
- ubuntu noble: tk8.6-doc 8.6.14-1build1
- ubuntu questing: tk8.6-doc 8.6.17-1
- ubuntu questing: tk9.0-doc 9.0.2-1
- ubuntu resolute: tk8.6-doc 8.6.17-1build1
- ubuntu resolute: tk9.0-doc 9.0.3-1
- ubuntu stonking: tk8.6-doc 8.6.18-1
- ubuntu stonking: tk9.0-doc 9.0.4-1
- 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 on : a language model's rewrite of the original, under its terms