[Tutor] Problems with tkinter callbacks

alan.gauld@bt.com alan.gauld@bt.com
Fri, 7 Apr 2000 17:27:05 +0100

> I tried to make a big program, but I had problems with changing
> objects's positions with the grid manager. I wrote a simple program to
> test solutions an couldn't find any. Thanks for every help.

Not sure this is relevant, or even correct but it looks 
slightly dodgy to me...

> 	self.title.grid(row=0, column=0)
>         self.title.bind('<1>',self.callback)
>     def callback(self):
>         self.title.grid_configure(column=2)

>     return apply(self.func, args)
> TypeError: too many arguments; expected 1, got 2

Suggests that the bind passes an event to your callback function 
but it does not expect any arguments(except the hidden 'self').

So maybe adding a parameter to the callback method will help?
OTOH me taking the time to read the code and work out whats 
going might help too...

Sorry, but I'm going home, its been a long week!

Alan G.