本文介绍了屏幕上显示Python Tkinter应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在我的17英寸显示器上使用Python的Tkinter模块设计了一个应用程序 屏幕.
I have designed an application using the Tkinter module from Python, on my 17" screen.
有没有办法使此应用适合较低分辨率的屏幕?我试图在14英寸的屏幕上运行它,但该应用程序不太适合.
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.
谢谢.
推荐答案您可以通过以下方式获取屏幕分辨率,然后将其输入到root.geometry中:
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()更多推荐
屏幕上显示Python Tkinter应用程序
发布评论