beetlebug▾
/

ttk::combobox index

Gives the numeric index of an index of the field.

PATHNAME index INDEX

Description

An index is a number from 0, end for the place after the last character, insert for the insert cursor, sel.first and sel.last for the ends of the selection, or @X for the character at the x pixel X. A number past the end is the end.

Returns

An integer.

Examples

% ttk::combobox .tcbix
> .tcbix insert 0 hello
> list [.tcbix index end] [.tcbix index 2] [.tcbix index 99]
5 2 5

Errors

% ttk::combobox .tcbix2; .tcbix2 index bogus
bad entry index "bogus"
-errorcode NONE

Facts

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

See also