beetlebug▾
/

ttk::frame identify

Gives the name of the element of the widget at a point.

PATHNAME identify ?element? X Y

Description

X and Y are pixels from the top left corner of the widget. The result is the name of the element at that point, such as border. A point outside the widget, or a widget that is not on the screen, gives an empty string. The word element before X and Y gives the same result.

Returns

The name of an element, or an empty string.

Examples

# The widget is not on the screen yet.
% ttk::frame .tfid
> .tfid identify 5 5

Errors

% ttk::frame .tfid2; .tfid2 identify foo 1 1
bad option "foo": must be element
-errorcode NONE

% ttk::frame .tfid3; .tfid3 identify 1
wrong # args: should be ".tfid3 identify ?what? x y"
-errorcode NONE

Facts

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

See also