Setting “tk scaling” in Tkinter affects widgets but not text

心已入冬 提交于 2019-12-12 15:17:19

问题


I'm trying to use Tk's "tk scaling" feature to zoom a GUI but it only seems to change the size of the widgets, not the text. Is it possible to use "tk scaling" with Tkinter and have it work appropriately? Here's my test script:

#!/usr/bin/python

from Tkinter import *

root = Tk()
root.tk.call('tk', 'scaling', '-displayof', '.', 50)
root.geometry('640x480+0+0')
label = Label(root, text='THis is some text')
button = Button(root, text='my button', command=root.quit)
label.pack()
button.pack()
root.mainloop()

来源:https://stackoverflow.com/questions/7183094/setting-tk-scaling-in-tkinter-affects-widgets-but-not-text

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!