beetlebug▾
/

menu activate

Makes the entry at INDEX the active entry.

PATHNAME activate INDEX

Description

The active entry shows with -activebackground and -activeforeground, and the index active gives it. The state of the entry becomes active. none, a separator, and a disabled entry make no entry active.

Returns

An empty string.

Examples

% menu .ac -tearoff 0
> .ac add command -label Open
> .ac activate 0
> .ac index active
0

Errors

% menu .ac2; .ac2 activate
wrong # args: should be ".ac2 activate index"
-errorcode NONE

Facts

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

See also