summaryrefslogtreecommitdiffstats
path: root/doc/clipboard.n
diff options
context:
space:
mode:
authordkf <donal.k.fellows@manchester.ac.uk>2004-10-28 10:19:28 (GMT)
committerdkf <donal.k.fellows@manchester.ac.uk>2004-10-28 10:19:28 (GMT)
commit2bd85cbab370268321d9634c72bc7a66df1de397 (patch)
tree4510d45a04d9e2aca7a63a3473795ac8dd76d9c8 /doc/clipboard.n
parent5a56a6eaaa415bbd89c3b00a8a58ca629182842f (diff)
downloadtk-2bd85cbab370268321d9634c72bc7a66df1de397.zip
tk-2bd85cbab370268321d9634c72bc7a66df1de397.tar.gz
tk-2bd85cbab370268321d9634c72bc7a66df1de397.tar.bz2
Backport of documentation fixes
Diffstat (limited to 'doc/clipboard.n')
-rw-r--r--doc/clipboard.n19
1 files changed, 16 insertions, 3 deletions
diff --git a/doc/clipboard.n b/doc/clipboard.n
index f36a219..340fb8b 100644
--- a/doc/clipboard.n
+++ b/doc/clipboard.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: clipboard.n,v 1.5 2002/07/04 01:09:47 hobbs Exp $
+'\" RCS: @(#) $Id: clipboard.n,v 1.5.2.1 2004/10/28 10:19:29 dkf Exp $
'\"
.so man.macros
.TH clipboard n 8.4 Tk "Tk Built-In Commands"
@@ -78,17 +78,30 @@ This feature may be convenient if, for example, \fIdata\fR starts
with a \fB\-\fR.
.RE
.TP
+\fBclipboard get\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-type\fR \fItype\fR?
.VS 8.4
-\fBclipboard get\fR ?\fB\-displayof\fR \fIwindow\fR? ?\fB\-type\fR?
Retrieve data from the clipboard on \fIwindow\fR's display.
\fIwindow\fR defaults to ".". \fIType\fR specifies the form in which
the data is to be returned and should be an atom name such as STRING
or FILE_NAME. \fIType\fR defaults to STRING. This command is
equivalent to \fBselection get -selection CLIPBOARD\fR.
.VE 8.4
+.SH EXAMPLES
+Get the current contents of the clipboard.
+.CS
+if {[catch {\fBclipboard get\fR} contents]} {
+ # There were no clipboard contents at all
+}
+.CE
+.PP
+Set the clipboard to contain a fixed string.
+.CS
+\fBclipboard clear\fR
+\fBclipboard append\fR "some fixed string"
+.CE
.SH "SEE ALSO"
-selection
+selection(n)
.SH KEYWORDS
clear, format, clipboard, append, selection, type