canvas insert
Inserts text into a text item, or points into a line or a polygon.
PATHNAME insert TAGORID INDEX TEXT
Description
For a text item, puts TEXT before the character at INDEX. For a line or a polygon, TEXT is a list of coordinates, and the coordinates go before the coordinate at INDEX.
Returns
An empty string.
Examples
% canvas .in
> .in create text 0 0 -text world
> .in insert 1 0 "hello "
> .in itemcget 1 -text
hello world
% canvas .in2
> .in2 create line 0 0 10 10
> .in2 insert 1 end {20 0}
> .in2 coords 1
0.0 0.0 10.0 10.0 20.0 0.0
Errors
% canvas .in3; .in3 insert
wrong # args: should be ".in3 insert tagOrId beforeThis string"
-errorcode NONE
Facts
- Capability
- None.
- Tcl release
- Tcl 9.1 and 8.6.
- Since
- ztk 1.0.0-beta.1