summaryrefslogtreecommitdiffstats
path: root/doc/option.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/option.n')
-rw-r--r--doc/option.n22
1 files changed, 18 insertions, 4 deletions
diff --git a/doc/option.n b/doc/option.n
index 4545eb2..9f6d48e 100644
--- a/doc/option.n
+++ b/doc/option.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: option.n,v 1.2 1998/09/14 18:22:58 stanton Exp $
+'\" RCS: @(#) $Id: option.n,v 1.2.26.1 2004/10/28 12:25:22 dkf Exp $
'\"
.so man.macros
.TH option n "" Tk "Tk Built-In Commands"
@@ -14,13 +14,12 @@
.SH NAME
option \- Add/retrieve window options to/from the option database
.SH SYNOPSIS
+.nf
\fBoption add \fIpattern value \fR?\fIpriority\fR?
-.sp
\fBoption clear\fR
-.sp
\fBoption get \fIwindow name class\fR
-.sp
\fBoption readfile \fIfileName \fR?\fIpriority\fR?
+.fi
.BE
.SH DESCRIPTION
@@ -86,6 +85,21 @@ Any of the above keywords may be abbreviated. In addition, priorities
may be specified numerically using integers between 0 and 100,
inclusive. The numeric form is probably a bad idea except for new priority
levels other than the ones given above.
+.SH EXAMPLES
+Instruct every button in the application to have red text on it unless
+explicitly overridden:
+.CS
+\fBoption add\fR *button.foreground red startupFile
+.CE
+.PP
+Allow users to control what happens in an entry widget when the Return
+key is pressed by specifying a script in the option database and add a
+default option for that which rings the bell:
+.CS
+entry .e
+bind .e <Return> [\fBoption get\fR .e returnCommand Command]
+\fBoption add\fR *.e.returnCommand bell widgetDefault
+.CE
.SH KEYWORDS
database, option, priority, retrieve