beetlebug▾
/

listbox curselection

Gives the indices of the selected items.

PATHNAME curselection

Description

Gives the index of each selected item, in increasing order. With no selection, gives an empty list.

Returns

A list of integers.

Examples

% listbox .cs
> .cs insert end a b c d
> .cs selection set 1 2
> .cs curselection
1 2

Errors

% listbox .cs2; .cs2 curselection x
wrong # args: should be ".cs2 curselection"
-errorcode NONE

Facts

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

See also