RE: Tk mouse wheel events?
by David LeBlanc other posts by this author
Aug 15 2002 9:52PM messages near this date
Re: Tk mouse wheel events?
|
Re: Tk mouse wheel events?
Perhaps there is some clean-up in the roll handler you're not doing.
David LeBlanc
Seattle, WA USA
> -----Original Message-----
> From: python-list-admin@[...].org
> [mailto:python-list-admin@[...].org]On Behalf Of Edward K. Ream
> Sent: Thursday, August 15, 2002 12:14
> To: python-list@[...].org
> Subject: Re: Tk mouse wheel events?
>
>
> > from Tkinter import *
> >
> > def roll(event):
> > print event.delta
> >
> > frame = Frame(width=200, height=200)
> > frame.pack()
> > frame.focus_set() # wheel events goes to focussed window
> > frame.bind("<MouseWheel>", roll)
>
> Thanks for this code. Alas, on my XP machine, the roll handler is called,
> and after a few calls tcl83.dll crashes. I don't think I've ever seen a
> hard tcl crash like this before.
>
> I didn't explicitly call focus_set(), and I suppose that shouldn't matter:
> the roll handler is only called when the canvas has focus. The
> Text widgets
> work properly as they always have.
>
> Edward
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
--
http://mail.python.org/mailman/listinfo/python-list
Thread:
Edward K. Ream
Anton Vredegoor
Edward K. Ream
David LeBlanc
Edward K. Ream
Fredrik Lundh
Steve Holden
Jeff Epler
|