summaryrefslogtreecommitdiffstats
path: root/doc/destroy.n
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-06-21 14:19:37 (GMT)
committerdkf <dkf@noemail.net>2004-06-21 14:19:37 (GMT)
commit68e82997d63990aa16ae89e6be8f4e73245b67e7 (patch)
tree720b2670714e31cfc8ad6bcbcce8ad71a3b281b2 /doc/destroy.n
parentbab1b9e88e999f99fe2e996a20231fe72ada4539 (diff)
downloadtk-68e82997d63990aa16ae89e6be8f4e73245b67e7.zip
tk-68e82997d63990aa16ae89e6be8f4e73245b67e7.tar.gz
tk-68e82997d63990aa16ae89e6be8f4e73245b67e7.tar.bz2
Added example
FossilOrigin-Name: f20aef6e4a277bc2d31035b660cf5d208f3a0044
Diffstat (limited to 'doc/destroy.n')
-rw-r--r--doc/destroy.n15
1 files changed, 12 insertions, 3 deletions
diff --git a/doc/destroy.n b/doc/destroy.n
index e2cde3d..ce01326 100644
--- a/doc/destroy.n
+++ b/doc/destroy.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: destroy.n,v 1.2 1998/09/14 18:22:55 stanton Exp $
+'\" RCS: @(#) $Id: destroy.n,v 1.3 2004/06/21 14:24:04 dkf Exp $
'\"
.so man.macros
.TH destroy n "" Tk "Tk Built-In Commands"
@@ -18,7 +18,6 @@ destroy \- Destroy one or more windows
.BE
.SH DESCRIPTION
-.VS
.PP
This command deletes the windows given by the
\fIwindow\fR arguments, plus all of their descendants.
@@ -28,7 +27,17 @@ The \fIwindow\fRs are destroyed in order, and if an error occurs
in destroying a window the command aborts without destroying the
remaining windows.
No error is returned if \fIwindow\fR does not exist.
-.VE
+.SH EXAMPLE
+Destroy all checkbuttons that are direct children of the given widget:
+.CS
+proc killCheckbuttonChildren {parent} {
+ foreach w [winfo children $parent] {
+ if {[winfo class $w] eq "Checkbutton"} {
+ \fBdestroy\fR $w
+ }
+ }
+}
+.CE
.SH KEYWORDS
application, destroy, window