From: Joe Van Dyk Date: 2005-06-22T05:41:48+09:00 Subject: Re: tk canvas question On 6/21/05, Joe Van Dyk wrote: > Hi, > > I'm drawing stuff on a TkCanvas. Essentially, a bunch of shapes that > move around. I need to keep track of where each shape has been, so I > can draw the shape's history if needed (a "slug track"). > > So every time a shape move, I store its position. When I want to view > a shape's history, I draw a line connecting each stored position. > > I'm currently drawing all of these lines directly on to the main canvas. > > The problem is when I want to hide the history lines. There can be > 400 shapes, and each of them could have thousands of lines that detail > their previous history. Going through and deleting all the TkcLines > is taking a very long time. > > Is there a way to "group" each shape's history lines and then be able > to give one command that shows and hides the lines in that group? > > Thanks, > Joe Aha. I found something called TkcGroup. I'm having difficulties figuring out how to remove and/or hide the canvas objects that are in each group though.