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.
region:heading,separatorbetween two headings,treein the tree column,cellin a data column, ornothing.itemandrow: the ID of the item at the point.column: the column at the point as#N.element: the name of the element at the point, such asTreeitem.indicator.
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