Fractal

Ian Kelly ian.g.kelly at gmail.com
Thu May 16 13:53:47 EDT 2013


On Thu, May 16, 2013 at 10:55 AM, Sharon COUKA <sharon_couka at hotmail.com> wrote:
> # Register events
> c.bind('i', zoom)
> c.bind('i', unzoom)
> c.bind('i', mouseMove)

I'm not an expert at Tkinter so maybe one of the other residents can
help you better with that.  The code above looks wrong to me, though.
As far as I know, 'i' is not a valid event sequence in Tkinter, and
besides you probably want to bind these functions to three *different*
events.  See here for the docs on event sequences:

http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/event-sequences.html

Based on your code, it looks like you would probably want something like:

c.bind('<Button-1>', zoom)
c.bind('<Button-2>', unzoom)
c.bind('<Motion>', mouseMove)



More information about the Python-list mailing list