我得到了第二帧的这种奇怪行为。如何将“Clone Repo”和“Pull”按钮调整为完整的列大小?输出图片:
资源:
from Tkinter import *
root = Frame()
root.grid(sticky=N+S+E+W)
local=LabelFrame(root, text="local")
local.grid(row=0, sticky=E+W)
external=LabelFrame(root, text="external")
external.grid(row=1, sticky=E+W)
StatusButton=Button(local, text="status")
StatusButton.grid(row=0, columnspan=2, sticky=W+E)
AddFileEntry=Entry(local)
AddFileEntry.grid(row=1, column=0)
AddFileButton=Button(local, text="add changed/new file(s)")
AddFileButton.grid(row=1, column=1, sticky=W+E)
CommitEntry=Entry(local)
CommitEntry.grid(row=2, column=0)
CommitButton=Button(local, text="Comment on changes")
CommitButton.grid(row=2, column=1, sticky=W+E)
CloneRepoEntry=Entry(external)
CloneRepoEntry.grid(row=0, column=0)
CommitRepoButton=Button(external, text="Clone repo")
CommitRepoButton.grid(row=0, column=1, sticky=W+E)
PushButton=Button(external, text="Push")
PushButton.grid(row=1, column=0, sticky=W+E)
PullButton=Button(external, text="Pull")
PullButton.grid(row=1, column=1, sticky=W+E)
root.mainloop()