[Tkinter-discuss] Tk*Font question
Bryan Oakley
bryan.oakley at gmail.com
Thu Mar 1 01:06:36 CET 2012
On Wednesday, February 29, 2012, Bob Greschke wrote:
> What's the correct way to change the font size? The "Change" button isn't
> doing what I thought it would. The font changes size, but turns into some
> proportional font. I'm kinda new (1 day) to using TkFixedFont and its
> friends. I'm used to ("Monoco", 9) sort of stuff and I'm not sure I
> understand what's going on.
The best way is to use a named font. With that you can do
'myfont.configure(size=new_size)'. Then, every widget that uses that font
will automatically see the change.
For more information see
http://www.pythonware.com/library/tkinter/introduction/x444-fonts.htm
Named fonts are one of the true gems of tk. They have been part of the
toolkit for probably a decade or more, and still to the best of my
knowledge no popular toolkit has anything as powerful and easy to use.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20120229/6967a490/attachment.html>
More information about the Tkinter-discuss
mailing list