开发者

Setting "tk scaling" in Tkinter affects widgets but not text

开发者 https://www.devze.com 2023-03-30 06:38 出处:网络
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 appro

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)
la开发者_开发知识库bel.pack()
button.pack()
root.mainloop()
0

精彩评论

暂无评论...
验证码 换一张
取 消