beetlebug▾
/

ttk::panedwindow identify

Gives the sash or the element at a point.

PATHNAME identify ?element|sash? X Y

Description

With sash or no word, gives the index of the sash at the pixel X and Y, or an empty string. With element, gives the name of the element at the point, such as hsash.

Returns

A sash index, an element name, or an empty string.

Examples

% ttk::panedwindow .tpwid -orient horizontal
> foreach n {a b} {ttk::frame .tpwid.$n -width 100 -height 50; .tpwid add .tpwid.$n}
> pack .tpwid
> update
> set x [expr {[.tpwid sashpos 0] + 1}]
> list [.tpwid identify $x 5] [.tpwid identify 5 5]
0 {}

Errors

% ttk::panedwindow .tpwid2; .tpwid2 identify foo 1 1
bad option "foo": must be element or sash
-errorcode NONE

Facts

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

See also