beetlebug▾
/

canvas type

Gives the type of an item.

PATHNAME type TAGORID

Description

Gives the type of the first item of TAGORID, such as rectangle or text. An ID with no item gives an empty string.

Returns

An item type, or an empty string.

Examples

% canvas .ty
> .ty create oval 0 0 10 10
> .ty type 1
oval

Errors

% canvas .ty2; .ty2 type
wrong # args: should be ".ty2 type tag"
-errorcode NONE

Facts

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

See also