下面是代碼:窗口太小
from Tkinter import *
def main():
w1 = Tk()
w1["height"] = 400;
w1["width"] = 500;
w1.title("Gui")
f1 = Frame(w1)
f1.grid_propagate()
f1["height"] = w1["height"];
f1["width"] = w1["width"];
f1.pack()
p1 = Button(f1)
p1["borderwidth"] = 6
p1["text"] = "esci"
p1["background"] = "red"
p1["command"] = f1.quit
p1.pack()
w1.mainloop()
main()
我已經給w1
和f1
(窗口和框架)一個500x400大小,但似乎過於小窗口:這是太小了,我要說的黑白200x100,但我不知道......爲什麼會發生這種情況?