tkinter buttons and columnspan

Stephen Boulet stephen at theboulets.net
Wed Jan 22 14:55:14 CET 2003


Yep, that's exactly what I'm saying; it doesn't work:

from Tkinter import *

root = Tk()

Button(root,text = 'foo').grid(column=0, row=0)
Button(root,text = 'foo').grid(column=1, row=0)
Button(root,text = 'foo').grid(column=0, row=2, columnspan=2)

root.mainloop()

-- Stephen

Eric Brunel wrote:

> Stephen Boulet wrote:
>> Is there a way, when using grid to place widgets in tkinter, to make a
>> button fully occupy multiple columns?
>> 
>> -- Stephen
> 
> What's your point? Doesn't:
> 
> b = Button(...)
> b.grid(row=..., column=..., columnspan=...)
> 
> work?





More information about the Python-list mailing list