Fwd: Setting defualt font in Tkinter

johngrayson at home.com johngrayson at home.com
Wed Aug 8 06:27:01 EDT 2001


--- In python-list at y..., Norman Charnley <norman at e...> wrote:

Is there a way to change the default font in Tkinter for all applications
(using Python 2.1 under RedHat Linux 7.1)? 

I know I can set it specifically when I am creating widgets, but it would
be useful to have the default a little more readable. 

In particular, when I fire up Idle, the menu font (not the editing font,
which IS configurable) is awful, and although I can mostly fix it up by
poking about in EditorWindow.py, that seems a messy way to have to go.

Thanks in advance for any help....

Norman

You can set a generic font, or specific fonts for widget classes:

  root.option_add('*Font',                  'Verdana 10 bold')
  root.option_add('*Entry.Font',            'Verdana 8 bold')
  root.option_add('*Text.Font',             'Verdana 8 bold')

(Use X resource format)

--- End forwarded message ---






More information about the Python-list mailing list