TKinter, buttonwidget response problem(1) and all btns the same size(2)!
Fredrik Lundh
fredrik at pythonware.com
Sat Apr 5 11:09:50 EDT 2008
skanemupp at yahoo.se wrote:
>> def __init__(self):
>> # ...
>> button = Button(self,
>> text='1',
>> command=lambda n=1: self.display(n))
>> # ...
>>
>> def display(self, number):
>> print number
>
> should this really be inside the __init__ function?
what's wrong with creating widgets in an __init__ method?
</F>
More information about the Python-list
mailing list