ttk::treeview children
Gives or replaces the children of an item.
PATHNAME children ITEM ?NEWCHILDREN?
Description
With no NEWCHILDREN, gives the IDs of the children of ITEM in their order. With NEWCHILDREN, a list of IDs, makes them the children of ITEM in that order. The old children that are not in the list are detached, and stay in the tree view.
Returns
A list of IDs, or an empty string.
Examples
% ttk::treeview .ttvch
> .ttvch insert {} end -id a
> .ttvch insert a end -id a1
> .ttvch insert a end -id a2
> .ttvch children a
a1 a2
% .ttvch children a {a2 a1}
> .ttvch children a
a2 a1
Errors
% ttk::treeview .ttvch2; .ttvch2 children 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