Re: Mouse event - binding

2006-04-05 Thread John McMonagle
On Wed, 2006-04-05 at 16:04 -0700, beta wrote: > Hi John, > > It don't work! > I did what you told me, here is theBall function > > def theBall(self): > self.ball = self.draw.create_oval("0i", "0i", "0.20i", > "0.20i", > fill="red") > se

Re: Mouse event - binding

2006-04-05 Thread John McMonagle
On Wed, 2006-04-05 at 16:04 -0700, beta wrote: > Hi John, > > It don't work! > I did what you told me, here is theBall function > > def theBall(self): > self.ball = self.draw.create_oval("0i", "0i", "0.20i", > "0.20i", > fill="red") > se

Re: Mouse event - binding

2006-04-05 Thread beta
Hi John, It don't work! I did what you told me, here is theBall function def theBall(self): self.ball = self.draw.create_oval("0i", "0i", "0.20i", "0.20i", fill="red") self.draw.tag_bind(self.ball, '', changeColour) Would you review all

Re: Mouse event - binding

2006-04-05 Thread John McMonagle
On Wed, 2006-04-05 at 09:21 -0700, beta wrote: > Dear John, > > Thanks for your help. I don't know how to bind the ball only into a > program. Would you mind help me on this? I added the changeColour > function, here is a complete program. ...SNIP code... Add the following code after you draw t

Re: Mouse event - binding

2006-04-05 Thread beta
Dear John, Thanks for your help. I don't know how to bind the ball only into a program. Would you mind help me on this? I added the changeColour function, here is a complete program. --- from Tkinter import * import string class Pong(Frame): def createWidgets(self):

Re: Mouse event - binding

2006-04-04 Thread John McMonagle
On Tue, 2006-04-04 at 14:46 -0700, beta wrote: > Hello All, > > I am new with Python, your help would be very appreciated. > > I have a simple pinpong applicaiton. I would like make a ball's color > change when mouse is clicked on it. > > Here is my sample code: > > from Tkinter import * > > i

Mouse event - binding

2006-04-04 Thread beta
Hello All, I am new with Python, your help would be very appreciated. I have a simple pinpong applicaiton. I would like make a ball's color change when mouse is clicked on it. Here is my sample code: from Tkinter import * import string class Pong(Frame): def createWidgets(self):