beetlebug▾
/

ttk::menubutton 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 label. 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::menubutton .tmbid
> .tmbid identify 5 5

Errors

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

% ttk::menubutton .tmbid3; .tmbid3 identify 1
wrong # args: should be ".tmbid3 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