我是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,再次運行腳本,這很好...無論如何代碼示例是在編輯 –