En Sat, 05 Apr 2008 03:02:02 -0300, <[EMAIL PROTECTED]> escribió:

> 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?

Yes, I looked at the code, andn I don't see the word "bind" anywhere, do  
you?

> def Display(self, event_obj):
>         button = event_obj.widget
>         text = button.cget("text")
>
>         if text=="1":
>             print 1

This Display method is OK for *bind* but you're using *command*. Read the  
previous response and in particular the Tkinter book - from the same guy  
who wrote the library.

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to