Fonts & Tinker

Rick Johnson rantingrickjohnson at gmail.com
Sun Jan 27 10:34:58 EST 2013


On Friday, January 25, 2013 10:41:36 PM UTC-6, Angel wrote:
> I am changing the default font for a Tkinter application:
> 
> 
> 
> class FuelControl(Tkinter.Frame):
> 
>     def __init__(self,master):
> 
>         self.version='0.02'
> 
>         self.font=tkFont.Font(family="Helvetica",size=18) 
> 
>         print self.font.actual()


You may want to check out these universal Tkinter widget methods:

 w.option_add(pattern, value, priority=None)
 w.option_clear()
 w.option_get(name, classname)
 w.option_readfile(fileName, priority=None)

 http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/universal.html

While you are there, poke around the docs a bit because there is tons of good info you are going to need in the future. May want to get familiar with the new ttk widgets and themes.



More information about the Python-list mailing list