Mike Ignatoski wrote:
Mike Ignatoski wrote:
As a former Perl/Tk programmer in the process of converting to Tkx, I
was wondering if anyone knew of a Tcl/Tk equivalent to the Perl/Tk
canvas 'Group' item. (where multiple canvas items are grouped
together, given a single canvas ID, and then manipulated by the canvas
as a single "mega item" In addition to the 'createGroup' canvas
method was a corresponding method to retrieve all of the individual
canvas item "members" of the group so an individual item could be
manipulated if desired.
This sounds like a direct layer on top of canvas -tags.
Remember that
the creation of any item takes -tags, and this is a Tcl list (Perl
array) that allows for grouping. Is there something different in the
above that isn't handled by tags?
Yes, I think so. The 'Group' item calculates a bounding box (bbox) that
includes all items. I'm not sure of what else at this time, but there's
also a level of convenience.
That would be $canvas->bbox($tagOrId); ... I don't think there is any
more than an unnecessary abstraction here.
Jeff