beetlebug▾
/

grab current

Gives the widget with the grab.

grab current ?WINDOW?

Description

Gives the grab widget as a list of one name, or an empty list when no widget has the grab. ztk has one display, so a WINDOW gives the same result.

Returns

A list of zero or one widget name.

Examples

% frame .c
> grab .c
> list [grab current] [grab current .]
.c .c

# The grab ends with its widget.
% destroy .c
> grab current

Errors

% grab current a b
wrong # args: should be "grab current ?window?"
-errorcode TCL WRONGARGS

Facts

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

See also