beetlebug▾
/

clipboard clear

Empties the clipboard.

clipboard clear ?-displayof WINDOW?

Description

Removes the data of each type, and makes the app the owner of the clipboard. The clipboard of the system gets an empty text.

Options

OptionTypeDefaultDescription
-displayofwindownoneA window of the display whose clipboard is emptied.

-displayof WINDOW

A window of the display whose clipboard is emptied.

ztk has one clipboard for each app, so the window only has to exist.

% clipboard clear -displayof .
% clipboard clear -displayof .nope
bad window path name ".nope"
-errorcode NONE

Returns

An empty string.

Examples

% clipboard append x
> clipboard clear
> catch {clipboard get}
1

Errors

% clipboard clear now
wrong # args: should be "clipboard clear ?-displayof window?"
-errorcode TCL WRONGARGS

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also