diff options
Diffstat (limited to 'doc/clipboard.n')
-rw-r--r-- | doc/clipboard.n | 19 |
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 |