[Tkinter-discuss] Canvas tag bindings not going away?

2009-09-01 Thread Bob Greschke
Doesn't ACanvas.delete(ALL) get rid of bindings too? I'm drawing regular map dots (create_oval) on a Canvas "map" and each one gets a Tag, like "P1", "P2", etc. I do a tag_bind to to get a popup menu item for each dot. Everything works fine. I then have two radiobuttons, one for a regul

Re: [Tkinter-discuss] Canvas tag bindings not going away?

2009-09-01 Thread Michael Lange
Hi Bob, On Tue, 1 Sep 2009 12:07:45 -0600 Bob Greschke wrote: > Doesn't ACanvas.delete(ALL) get rid of bindings too? I'm drawing > regular map dots (create_oval) on a Canvas "map" and each one gets a > Tag, like "P1", "P2", etc. I do a tag_bind to to get a > popup menu item for each dot

Re: [Tkinter-discuss] Canvas tag bindings not going away?

2009-09-01 Thread Bob Greschke
If I understand you correctly, what you describe is what I think that tag bindings are supposed to do. I tried the following: from Tkinter import * c = Canvas() c.pack() def test(ev): ... print 'foo' ... c.tag_bind('tag_foo', '<1>', test) c.create_rectangle(0, 0, 100, 100, fill='blue', tag

Re: [Tkinter-discuss] Canvas tag bindings not going away?

2009-09-01 Thread Greg Ewing
Bob Greschke wrote: I redraw the create_oval()s with the same kind of Tags ("P1", "P2", etc.), but without doing a tag_bind to ... The new dots still react to a event like as if the TAG is still bound to the event. It probably is. You've told the canvas " on any item tagged with "P3"