beetlebug▾
/

ttk::treeview identify

Gives the part of the tree view at a point.

PATHNAME identify region|item|column|row|element X Y
PATHNAME identify X Y

Description

X and Y are pixels in the widget. The component word picks the answer.

With no component, gives item ID column COLUMN for a row, or heading COLUMN for a heading.

Returns

A name, an ID, a column, or an empty string.

Examples

% ttk::treeview .ttvid
> .ttvid heading #0 -text Name
> .ttvid insert {} end -id a -text A
> pack .ttvid
> update
> list [.ttvid identify region 5 5] [.ttvid identify item 5 30] [.ttvid identify column 5 30]
heading a #0

Errors

% ttk::treeview .ttvid2; .ttvid2 identify bogus 5 5
bad command "bogus": must be region, item, column, row, or element
-errorcode NONE

Facts

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

See also