Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #45440

Re: Fractal

References <DUB406-EAS2733F3138D2284E49821C21EAA00@phx.gbl> <CALwzidmj9_tud-mdTv0CYKC+rhev0GgSwsi4cZhKZRFWwGRfYA@mail.gmail.com> <DUB403-EAS298981D0889EB4B31B2278CEAA30@phx.gbl> <CALwzidmkXcr-5=h_AZu-7S3ZEStu0Gb5CzoXYmVBirzwZ2Y2QA@mail.gmail.com> <DUB101-W288C9AB231A14B2A196F57EAA30@phx.gbl>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2013-05-16 11:53 -0600
Subject Re: Fractal
Newsgroups comp.lang.python
Message-ID <mailman.1767.1368726876.3114.python-list@python.org> (permalink)

Show all headers | View raw


On Thu, May 16, 2013 at 10:55 AM, Sharon COUKA <sharon_couka@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)

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Fractal Ian Kelly <ian.g.kelly@gmail.com> - 2013-05-16 11:53 -0600

csiph-web