4
如何使用Tkinter或可能使用Python标准库来获取Windows当前大小?如何使用Tkinter获得Windows当前大小?
如何使用Tkinter或可能使用Python标准库来获取Windows当前大小?如何使用Tkinter获得Windows当前大小?
使用下面的通用部件的方法(其中w
是一个小部件):
w.winfo_height()
w.winfo_width()
您也可以使用以下方法:
w.winfo_reqheight()
w.winfo_reqwidth()
请注意,这两个可以给出截然不同的结果。 _height/_width给出实际尺寸。 – 2010-11-01 01:32:47
重复:http://stackoverflow.com/questions/3949844/python-calculate-the-screen-size/3949983#3949983 – mouad 2010-10-31 23:42:51