ttk::treeview focus
Gives or sets the focus item.
PATHNAME focus ?ITEM?
Description
The focus item is the item of the keyboard: the arrow keys move it, and a key event of a tag goes to it. With no ITEM, gives the focus item, or an empty string. With ITEM, makes it the focus item.
Returns
An ID, or an empty string.
Examples
% ttk::treeview .ttvfo
> .ttvfo insert {} end -id a
> .ttvfo focus a
> .ttvfo focus
a
Errors
% ttk::treeview .ttvfo2; .ttvfo2 focus nosuch
Item nosuch not found
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1