global font for Tkinter

Fredrik Lundh fredrik at pythonware.com
Wed Apr 25 13:37:37 EDT 2001


"Jacek Pop³awski" wrote:
> How to set global font for all Tkinter widgets?

here's one way to do it:

from Tkinter import *

root = Tk()

root.option_add("*font", "Times 24")

w = Label(root, text="hello")
w.pack()
w = Entry(root)
w.pack()
w = Listbox(root)
w.insert(END, "hello", "world")
w.pack()

mainloop()

Cheers /F





More information about the Python-list mailing list