How to set font size of Entry in Tkinter

Milan Skála picture Milan Skála · Jun 28, 2013 · Viewed 23.9k times · Source

I am a newbie in Python and I would like to set font size in Entry widget. I tried to set parameter font=("Calibri",12), but nothing happened, font size is just like the default. Is there any way how to set it?

Edit:

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()

Answer

Ari picture Ari · May 28, 2014
from Tkinter import *

root = Tk()

EntryList = []
for i in range(81):

EntryList.append(Entry(root, font = "Helvetica 44 bold",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()