listbox itemcget
Gives the value of an option of one item.
PATHNAME itemcget INDEX OPTION
Description
An item has the options -background, -foreground, -selectbackground, and -selectforeground. An empty value uses the option of the listbox.
Returns
The value of the option of the item.
Examples
% listbox .ic
> .ic insert end a b
> .ic itemconfigure 1 -foreground red
> .ic itemcget 1 -foreground
red
Errors
% listbox .ic2; .ic2 insert end a; .ic2 itemcget 0 -foo
unknown option "-foo"
-errorcode NONE
% listbox .ic3; .ic3 itemcget 4 -background
item number "4" out of range
-errorcode NONE
% listbox .ic4; .ic4 itemcget 0
wrong # args: should be ".ic4 itemcget index option"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1