canvas::tag - Easier management of the tags on canvas items or item groups
Contents
Api
::canvas::tagappendcanvastagOrIdtag...
This command adds the tags tag... to the tag list for the items identified by the tagOrId in the
canvas widget. The new tags are added at the end of the list.
The result of the command is the empty string.
::canvas::tagprependcanvastagOrIdtag...
This command adds the tags tag... to the tag list for the items identified by the tagOrId in the
canvas widget. The new tags are added at the beginning of the list.
The result of the command is the empty string.
::canvas::tagappendcanvastagOrIdindextag...
This command adds the tags tag... to the tag list for the items identified by the tagOrId in the
canvas widget. The new tags are inserted before the element at index.
index0 refers to the beginning of the list.
indexend refers to after the end of the list.
The result of the command is the empty string.
::canvas::tagremovecanvastagOrIdtag...
This command removes the named tags tag... from the tag list for the items identified by the
tagOrId in the canvas widget.
The result of the command is the empty string.
::canvas::tagmatchcanvastagOrIdpattern
This command finds all tags for the items identified by the tagOrId in the canvas widget which
match the glob pattern.
The result of the command is a list of the matching tags. Which may be empty.
Bugs, Ideas, Feedback
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please
report such in the category canvas of the TklibTrackers [http://core.tcl.tk/tklib/reportlist]. Please
also report any ideas for enhancements you may have for either package and/or documentation.
Description
This package provides utility commands for easier management of the tag lists associated with canvas
items or item groups.
The problem with the existing canvas API is that a tag list can only be set as a whole, making adding and
removing of tags from such lists relatively complex operations reading the current tag list, modifying
it, and then writing the changed list back.
The commands provided by this package hide all this complexity from the user.
Keywords
append tag, canvas, insert tag, remove tag, tags
tklib 0.1 canvas::tag(3tk)
Name
canvas::tag - Easier management of the tags on canvas items or item groups
Synopsis
package require Tcl8.5
package require Tk8.5
package require canvas::tag?0.1?::canvas::tagappendcanvastagOrIdtag...
::canvas::tagprependcanvastagOrIdtag...
::canvas::tagappendcanvastagOrIdindextag...
::canvas::tagremovecanvastagOrIdtag...
::canvas::tagmatchcanvastagOrIdpattern
________________________________________________________________________________________________________________
