Name

clipboard

clipboard operation [arg arg...]

Clear or append to the contents of the Tk clipboard for later retrieval using the selection command. The following operations are defined:

clipboard append [-displayof window] [-format format] [-type type] [--] data

Append data to the clipboard on window’s display. type specifies the form in which the selection is to be returned as an atom name such as STRING or FILE_NAME (see the Inter-Client Communication Conventions Manual). The default is STRING.

When compatibility with a non-Tk clipboard requester is needed, the format argument can be used to specify the representation that should be used to transmit the selection. Format defaults to STRING, which transmits the selection as 8-bit ASCII characters.

clipboard clear [-displayof window]

Claim ownership of the clipboard on window’s display (defaults to ''.'') and remove any previous contents.

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.