beetlebug▾
/

ttk::entry delete

Deletes characters of the text.

PATHNAME delete FIRST ?LAST?

Description

Deletes the characters from the index FIRST up to the character before LAST. With no LAST, deletes the one character at FIRST. A LAST before FIRST deletes no character. A field with the flag readonly or disabled makes no change.

Returns

An empty string.

Examples

% ttk::entry .tede
> .tede insert 0 "hello world"
> .tede delete 0 6
> .tede get
world

% ttk::entry .tede2
> .tede2 insert 0 abc
> .tede2 delete 0 end
> .tede2 get

Errors

% ttk::entry .tede3; .tede3 delete
wrong # args: should be ".tede3 delete firstIndex ?lastIndex?"
-errorcode NONE

Facts

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

See also