setting the font in Tkinter

Bernhard Herzog herzog at
Sun Sep 17 16:58:38 CEST 2000

rickp at (Rick Pasotto) writes:

> This didn't work for me on linux. I got from the traceback:
>"option","*Font","Helvetica -24")
> 	TclError: bad option "*Font": must be add, clear, get, or readfile

How about 

   root.option_add("*Font", "Helvetica -24")

It's usually better to call the appropriate methods instead of accessing
the tk attribute directly.

Bernhard Herzog   | Sketch, a drawing program for Unix
herzog at  |

More information about the Python-list mailing list