Tkinter: making buttons the same size?

Guilherme Polo ggpolo at gmail.com
Sat Apr 5 13:17:08 EDT 2008


2008/4/5, skanemupp at yahoo.se <skanemupp at yahoo.se>:
> how do i do that? i get this error:
>
>
>
>  self.btnDisplay = Button(self,text='1',command=lambda
>  n=1:self.Display(n))
>
>         self.btnDisplay.grid(row=3, column=0, padx=5, pady=5, width=1)
>
>
>         self.btnDisplay = Button(self,text='/',command=lambda
>  n="/":self.Display(n))
>
>         self.btnDisplay.grid(row=6, column=3, padx=5, pady=5, width=1)
>

Add it to the Button widget, not to the grid method.
mybtn = Button(..., width=1)

Thanks,

-- 
-- Guilherme H. Polo Goncalves



More information about the Python-list mailing list