summaryrefslogtreecommitdiffstats
path: root/doc/clipboard.n
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2004-06-18 21:16:20 (GMT)
committerdkf <dkf@noemail.net>2004-06-18 21:16:20 (GMT)
commitdf5a05263a97f37f62ce85cb36961ed6cd7b9f97 (patch)
tree36aa58049b17d5fbec860637951b5e6a02dba4f4 /doc/clipboard.n
parent71e97808faf3e67f5c81ecfaca31d9a7bbf91196 (diff)
downloadtk-df5a05263a97f37f62ce85cb36961ed6cd7b9f97.zip
tk-df5a05263a97f37f62ce85cb36961ed6cd7b9f97.tar.gz
tk-df5a05263a97f37f62ce85cb36961ed6cd7b9f97.tar.bz2
Added examples
FossilOrigin-Name: 92db2e56c6de0022c8e6e28e917d34d0ca9de7cb
Diffstat (limited to 'doc/clipboard.n')
-rw-r--r--doc/clipboard.n17
1 files changed, 15 insertions, 2 deletions
diff --git a/doc/clipboard.n b/doc/clipboard.n
index a53f6bb..9a3d00f 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.6 2004/03/04 00:06:06 hobbs Exp $
+'\" RCS: @(#) $Id: clipboard.n,v 1.7 2004/06/18 21:16:21 dkf Exp $
'\"
.so man.macros
.TH clipboard n 8.4 Tk "Tk Built-In Commands"
@@ -86,9 +86,22 @@ 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\fR get} contents]} {
+ # There were no clipboard contents at all
+}
+.CE
+.PP
+Set the clipboard to contain a fixed string.
+.CS
+\fBclipboard\fR clear
+\fBclipboard\fR append "some fixed string"
+.CE
.SH "SEE ALSO"
-selection
+selection(n)
.SH KEYWORDS
clear, format, clipboard, append, selection, type