beetlebug▾
/

menu entrycget

Gives the value of an option of the entry at INDEX.

PATHNAME entrycget INDEX OPTION

Description

The options of an entry are the options of add for its type.

Returns

The value of the option.

Examples

% menu .ec -tearoff 0
> .ec add command -label Print -accelerator Ctrl+P
> .ec entrycget 0 -accelerator
Ctrl+P

Errors

% menu .ec2 -tearoff 0; .ec2 add command; .ec2 entrycget 0 -foo
unknown option "-foo"
-errorcode TK LOOKUP OPTION -foo

% menu .ec3; .ec3 entrycget 1
wrong # args: should be ".ec3 entrycget index option"
-errorcode NONE

Facts

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

See also