beetlebug▾
/

listbox activate

Makes the item at INDEX the active item.

PATHNAME activate INDEX

Description

The active item has the mark of -activestyle while the listbox has the focus, and the index active gives it. An index past the end activates the last item.

Returns

An empty string.

Examples

% listbox .ac
> .ac insert end a b c
> .ac activate 1
> .ac index active
1

Errors

% listbox .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