diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2004-06-18 21:16:21 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2004-06-18 21:16:21 (GMT) |
commit | 33091e5884f9031d6c0fe4cfb246053678feed92 (patch) | |
tree | 36aa58049b17d5fbec860637951b5e6a02dba4f4 /doc/clipboard.n | |
parent | 41bc36d1c5d5f30748dc3e7d21ef248b69450a4c (diff) | |
download | tk-33091e5884f9031d6c0fe4cfb246053678feed92.zip tk-33091e5884f9031d6c0fe4cfb246053678feed92.tar.gz tk-33091e5884f9031d6c0fe4cfb246053678feed92.tar.bz2 |
Added examples
Diffstat (limited to 'doc/clipboard.n')
-rw-r--r-- | doc/clipboard.n | 17 |
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 |