beetlebug▾
/

ttk::treeview parent

Gives the parent of an item.

PATHNAME parent ITEM

Description

Gives the ID of the parent, or an empty string for an item at the top level.

Returns

An ID, or an empty string.

Examples

% ttk::treeview .ttvpr
> .ttvpr insert {} end -id a
> .ttvpr insert a end -id a1
> list [.ttvpr parent a1] [.ttvpr parent a]
a {}

Errors

% ttk::treeview .ttvpr2; .ttvpr2 parent 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