tkinter buttons and columnspan

Stephen Boulet stephen.boulet at motorola.com
Wed Jan 22 10:43:56 EST 2003


Thanks again Laura!

Laura Creighton wrote:
>>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()
> 
> 
> You need the sticky option. 
> Button(root,text = 'foo').grid(column=0, row=2, columnspan=2, sticky=W+E+N+S)
> 
> see: http://www.pythonware.com/library/tkinter/introduction/x4951-patterns.htm
> 
> Laura Creighton
> 






More information about the Python-list mailing list