TKinter, buttonwidget response problem(1) and all btns the same size(2)!
skanemupp at yahoo.se
skanemupp at yahoo.se
Sat Apr 5 02:02:02 EDT 2008
am i not doing that then? did u look at the code? where do i add the
bind if this:
btnDisplay = Button(self, text="1", command=self.Display)
btnDisplay.grid(row=3, column=0, padx=5, pady=5)
is not enough?
def Display(self, event_obj):
button = event_obj.widget
text = button.cget("text")
if text=="1":
print 1
i get this exception so i need to pass another argument? im passing 2
no?
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python25\lib\lib-tk\Tkinter.py", line 1403, in __call__
return self.func(*args)
TypeError: Display() takes exactly 2 arguments (1 given)
More information about the Python-list
mailing list