in reply to Tk-Canvas Grouping

To answer the first part of your question, according to the Tk::Canvas documentation, find() returns a list:

This method returns a list consisting of all the items that meet the constraints specified by ...

However, you are storing the result of the find in a scalar, and as such are getting only the last ID (which is what you always get with a list --- not an array --- in scalar context). Try changing your code to

my @id = $c->find( 'withtag', 'current' ); print "\t item id(s): @id\n";

(assuming you're not already using the variable @id) and see if that works. Good luck. Sorry I haven't had a chance to look at the second part of your question yet.

Replies are listed 'Best First'.
Re^2: Tk-Canvas Grouping
by Anonymous Monk on Jun 21, 2005 at 10:40 UTC
    Unfortunatley that produces the same result...I think it has something to do with the grouping. Onnce I ungroup them I'm able to retrieve the individual id's but loose the ability to manipulate (drag) them as a group :(