我是Python中的新手,我想在Entry
小部件中设置字体大小。我试图设置参数font=("Calibri",12)
,但没有发生任何事情,字体大小就像默认。 有没有办法如何设置它?如何设置Tkinter中Entry的字体大小
编辑:
from Tkinter import *
root = Tk()
EntryList = []
for i in range(81):
EntryList.append(Entry(root,font=("Calibri",12),justify="center",width=6,bg="#1E6FBA",fg="yellow",disabledbackground="#1E6FBA",disabledforeground="yellow",highlightbackground="black",highlightcolor="red",highlightthickness=1,bd=0))
EntryList[i].grid(row=i/9,column=i%9,ipady=14)
root.mainloop()
告诉我们在哪儿youre设法它 – Serial
我不明白它的代码。现在它工作正常。我刚刚删除了字体参数,运行脚本,结束脚本,按Ctrl + Z,再次运行脚本,这很好...无论如何代码示例是在编辑 –