1个回答
展开全部
你好,tkinter的messagebox是不可以调整大小的。如果你需要的话,你可以换其他的来实现,下面是一个例子。
from tkinter import * #If you get an error here, try Tkinter not tkinter
def Dialog1Display():
Dialog1 = Toplevel(height=100, width=100) #Here
def Dialog2Display():
Dialog2 = Toplevel(height=1000, width=1000) #Here
master=Tk()
Button1 = Button(master, text="Small", command=Dialog1Display)
Button2 = Button(master, text="Big", command=Dialog2Display)
Button1.pack()
Button2.pack()
master.mainloop()
from tkinter import * #If you get an error here, try Tkinter not tkinter
def Dialog1Display():
Dialog1 = Toplevel(height=100, width=100) #Here
def Dialog2Display():
Dialog2 = Toplevel(height=1000, width=1000) #Here
master=Tk()
Button1 = Button(master, text="Small", command=Dialog1Display)
Button2 = Button(master, text="Big", command=Dialog2Display)
Button1.pack()
Button2.pack()
master.mainloop()
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询