O'Reilly logo

Mastering Perl/Tk by Nancy Walsh, Stephen Lidie

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Determining Item Type

To determine an item’s type, call the typemethod:

$canvas->type(tag/id);

If the tag or ID matches more than one item, only the type of the first item is returned. The returned value will be a string describing the item type: "oval", "text", "rectangle", and so on.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required