Tkinter bind of class -- help

Cindy Huyser chuyser at flash.net
Sun Apr 23 00:28:22 EDT 2000


I've created a class that contains a number of Canvas widgets inside
frames.  When I import this class and instantiate it in my main program
I put it inside a frame.  

What I would like to do is to get x,y coordinate information on events
(either <Button-1> or <Motion>) that occur in the area occupied by the
class instance so that I can display detail information in another area
of the main window.  At first, I tried to use bind() on the class
instance, but received an error.  I have tried callbacks from the frame
in which the object resides, but find I only get event information for
that area unoccupied by the object; I have tried looking at information
stored in a member variable of the class, but have found the response
unacceptably slow.

Any suggestions for solving this problem would be greatly appreciated by
this newbie Tkinter programmer.



More information about the Python-list mailing list