TKinter, buttonwidget response problem(1) and all btns the same size(2)!

7stud bbxx789_05ss at yahoo.com
Sat Apr 5 14:02:42 EDT 2008


On Apr 5, 12:02 am, skanem... at yahoo.se wrote:
> 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?
>

1) Post the line in your code that passes two arguments to Display.

2) Post the line in yoru code where you call Display. "call" means
"execute", and '()' is used after a function name to execute the
function.





More information about the Python-list mailing list