[Tkinter-discuss] Canvas tag bindings not going away?
greg.ewing at canterbury.ac.nz
Wed Sep 2 00:23:19 CEST 2009
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 <Button-3> ... The new dots still react to
> a <Button-3> event like as if the TAG is still bound to the <Button-3>
It probably is. You've told the canvas "<Button-3> on any
item tagged with "P3" does this", and haven't rescinded that
In other words, the tag bindings are associated with the
canvas itself, not the individual items.
It sounds like you will indeed have to undo the tag
Alternatively, come up with a tagging scheme that allows
you to re-use the same tags for the same bindings, instead
of inventing a new tag for each canvas item that you want
to bind an event to.
More information about the Tkinter-discuss