ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Tk mouse wheel events?
by Edward K. Ream other posts by this author
Aug 15 2002 4:04PM messages near this date
Re: Memory overhead for trees? | Re: Tk mouse wheel events?
I am trying to get a binding to fire when the mouse wheel moves.  Vertical
scrolling is handled automatically by the Tk.Text widget, and I would like
to scroll a canvas.  The canvas is in a toplevel that includes Text widgets.

From a Google search it appears that Button-4 and Button-5 events might do
the job. I don't see this documented on the Tk man pages though.

The following doesn't seem ever to call the event handlers, no matter what
kind of widget is used:

widget.bind("<Button-4> ",self.OnButton4)
widget.bind("<Button-5> ",self.OnButton5)

Does anyone have any advice or example code?  Thanks!

Edward
--------------------------------------------------------------------
Edward K. Ream   email:  edream@[...].net
Leo: Literate Editor with Outlines
Leo: http://personalpages.tds.net/~edream/front.html
--------------------------------------------------------------------



-- 
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved