beetlebug▾
/

ttk::treeview detach

Takes items out of the tree and keeps them.

PATHNAME detach ITEMLIST

Description

Removes each item of ITEMLIST from the list of children of its parent. A detached item and its children stay in the tree view: exists gives 1, and move puts it back.

Returns

An empty string.

Examples

% ttk::treeview .ttvdt
> foreach id {a b} {.ttvdt insert {} end -id $id}
> .ttvdt detach a
> list [.ttvdt children {}] [.ttvdt exists a]
b 1

Errors

% ttk::treeview .ttvdt2; .ttvdt2 detach 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

See also