beetlebug▾
/

ttk::treeview item

Gives or sets the options of an item.

PATHNAME item ITEM
PATHNAME item ITEM OPTION
PATHNAME item ITEM OPTION VALUE ?OPTION VALUE ...?

Description

With no OPTION, gives a list of each item option and its value. With one OPTION, gives its value. With pairs, sets the options. The item options are these.

Returns

A list of options and values, a value, or an empty string.

Examples

% ttk::treeview .ttvit -columns {size}
> .ttvit insert {} end -id a -text A -values {1}
> .ttvit item a
-text A -image {} -values 1 -open 0 -tags {}

% ttk::treeview .ttvit2
> .ttvit2 insert {} end -id a
> .ttvit2 item a -open 1
> .ttvit2 item a -open
1

Errors

% ttk::treeview .ttvit3; .ttvit3 insert {} end -id a; .ttvit3 item a -bogus
unknown option "-bogus"
-errorcode NONE

% ttk::treeview .ttvit4; .ttvit4 insert {} end -id a; .ttvit4 item a -open x
expected boolean value but got "x"
-errorcode NONE

Facts

Capability
None.
Tcl release
Tcl 9.1 and 8.6.
Since
ztk 1.0.0-beta.1

See also