我想創建一個使用Tkinter的Python gui的基本佈局。Python Tkinter網格問題 - 用戶錯誤?
#!/usr/bin/env python
from Tkinter import *
#create root
root = Tk()
banner = Frame(root, width=500)
body = Frame(root, width=500)
banner.grid()
body.grid()
bannercontent = Label(banner, bg="Green", text="Green").grid(row=0, column=0)
bannerbuttons = Label(banner, bg="Red", text="Red").grid(row=0, column=1)
bodycontent = Label(body, bg="Blue", text="Blue").grid(row=1, column=0, columnspan=2, sticky=E+W)
root.mainloop()
然而與上述情況,藍標並沒有擴張,填補了2列,我希望,即填補綠色和紅色下方的空間。請問我做錯了什麼?這裏 http://imgur.com/nGWQX9y
例預先感謝您