menu entryconfigure
Gives or sets the options of the entry at INDEX.
PATHNAME entryconfigure INDEX ?OPTION? ?VALUE? ?OPTION VALUE ...?
Description
With no OPTION, gives a list with an entry for each option of the menu entry. With one OPTION, gives its entry: the option, two empty strings, the default, and the value. With pairs of options and values, sets each option of the menu entry.
Returns
An entry, a list of entries, or an empty string.
Examples
% menu .ef -tearoff 0
> .ef add command -label Open
> .ef entryconfigure 0 -label Close
> .ef entrycget 0 -label
Close
% menu .ef2 -tearoff 0
> .ef2 add command -label Open
> .ef2 entryconfigure 0 -label
-label {} {} {} Open
Errors
% menu .ef3 -tearoff 0; .ef3 add command; .ef3 entryconfigure 0 -foo 1
unknown option "-foo"
-errorcode TK LOOKUP OPTION -foo
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1