beetlebug▾
/

ttk::entry insert

Inserts a text before a character.

PATHNAME insert INDEX TEXT

Description

Inserts TEXT before the character at INDEX. An INDEX past the end adds the text at the end. A field with the flag readonly or disabled makes no change. With -validate key, the validation script can stop the insert.

Returns

An empty string.

Examples

% ttk::entry .tein
> .tein insert 0 world
> .tein insert 0 "hello "
> .tein insert end !
> .tein get
hello world!

Errors

% ttk::entry .tein2; .tein2 insert 0
wrong # args: should be ".tein2 insert index text"
-errorcode NONE

Facts

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

See also