beetlebug▾
/

canvas addtag

Adds TAG to each item that a search finds.

PATHNAME addtag TAG SEARCH ?ARG ...?

Description

SEARCH and its arguments are the forms of find: above, all, below, closest, enclosed, overlapping, and withtag. Each item that the search finds gets the tag TAG.

Returns

An empty string.

Examples

% canvas .at
> .at create rectangle 0 0 10 10
> .at addtag shape all
> .at gettags 1
shape

Errors

% canvas .at2; .at2 addtag x bogus
bad search command "bogus": must be above, all, below, closest, enclosed, overlapping, or withtag
-errorcode NONE

% canvas .at3; .at3 addtag
wrong # args: should be ".at3 addtag tag searchCommand ?arg ...?"
-errorcode NONE

Facts

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

See also