diff options
author | dkf <dkf@noemail.net> | 2004-06-21 14:19:37 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2004-06-21 14:19:37 (GMT) |
commit | 68e82997d63990aa16ae89e6be8f4e73245b67e7 (patch) | |
tree | 720b2670714e31cfc8ad6bcbcce8ad71a3b281b2 /doc | |
parent | bab1b9e88e999f99fe2e996a20231fe72ada4539 (diff) | |
download | tk-68e82997d63990aa16ae89e6be8f4e73245b67e7.zip tk-68e82997d63990aa16ae89e6be8f4e73245b67e7.tar.gz tk-68e82997d63990aa16ae89e6be8f4e73245b67e7.tar.bz2 |
Added example
FossilOrigin-Name: f20aef6e4a277bc2d31035b660cf5d208f3a0044
Diffstat (limited to 'doc')
-rw-r--r-- | doc/chooseDirectory.n | 18 | ||||
-rw-r--r-- | doc/destroy.n | 15 | ||||
-rw-r--r-- | doc/dialog.n | 10 |
3 files changed, 34 insertions, 9 deletions
diff --git a/doc/chooseDirectory.n b/doc/chooseDirectory.n index 42bf636..ad9cf75 100644 --- a/doc/chooseDirectory.n +++ b/doc/chooseDirectory.n @@ -2,7 +2,7 @@ '\" Copyright (c) 1998-2000 by Scriptics Corporation. '\" All rights reserved. '\" -'\" RCS: @(#) $Id: chooseDirectory.n,v 1.1 2000/01/27 00:23:10 ericm Exp $ +'\" RCS: @(#) $Id: chooseDirectory.n,v 1.2 2004/06/21 14:19:38 dkf Exp $ '\" .so man.macros .TH tk_chooseDirectory n 8.3 Tk "Tk Built-In Commands" @@ -43,10 +43,18 @@ option is not specified, then a default title will be displayed. Specifies whether the user may specify non-existant directories. If this parameter is true, then the user may only select directories that already exist. The default value is \fIfalse\fR. -.LP +.SH EXAMPLE +.CS +set dir [tk_chooseDirectory \\ + \-initialdir ~ \-title "Choose a directory"] +if {$dir eq ""} { + label .l -text "No directory selected" +} else { + label .l -text "Selected $dir" +} +.CE .SH "SEE ALSO" -tk_getOpenFile, tk_getSaveFile - +tk_getOpenFile(n), tk_getSaveFile(n) .SH KEYWORDS -directory selection dialog +directory, selection, dialog, platform-specific 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 diff --git a/doc/dialog.n b/doc/dialog.n index 0e93888..269726a 100644 --- a/doc/dialog.n +++ b/doc/dialog.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: dialog.n,v 1.2 1998/09/14 18:22:55 stanton Exp $ +'\" RCS: @(#) $Id: dialog.n,v 1.3 2004/06/21 14:28:56 dkf Exp $ '\" .so man.macros .TH tk_dialog n 4.1 Tk "Tk Built-In Commands" @@ -60,6 +60,14 @@ of the buttons, then -1 is returned. While waiting for the user to respond, \fBtk_dialog\fR sets a local grab. This prevents the user from interacting with the application in any way except to invoke the dialog box. +.SH EXAMPLE +.CS +set reply [\fBtk_dialog\fR .foo "The Title" "Do you want to say yes?" \\ + questhead 0 Yes No "I'm not sure"] +.CE + +.SH "SEE ALSO" +tk_messageBox(n) .SH KEYWORDS bitmap, dialog, modal |