问题
I have designed an application using the Tkinter module from Python, on my 17" screen.
Is there a way to make this app fit on lower resolution screens? I have tried to run it on a 14" screen, and the app doesn`t fit well.
Thank you.
回答1:
You can get the screen resolution then input them in your root.geometry
, this way:
from Tkinker import *
root = Tk()
width, height = root.winfo_screenwidth(), root.winfo_screenheight()
root.geometry('%dx%d+0+0' % (width,height))
root.mainloop()
来源:https://stackoverflow.com/questions/30965033/python-tkinter-application-fit-on-screen