problem changing font settings for ttk themed widgets on Windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

problem changing font settings for ttk themed widgets on Windows

Lynn Oliver


On OS X, ttk.Style().configure('TLabelframe.label', font='helvetica 14 bold') works to change the font used by the ttk.LabelFrame widget. 

On Windows, ttk.Style().configure('TLabelframe.label', font='arial 14 bold') has no effect other than causing  ttk.Style().lookup('TLabelframe.label','font' to return the changed font info.

ttkButton and ttk.CheckButton also do not allow the font to be changed on Windows.  ttk.Label does allow the font to change.

I tried creating a derived style but that doesn't work either.

Changing the font setting in python27/tcl/tk8.5/ttk/xpTheme.tcl does change the font being displayed. Removing the -font TkDefaultFont setting from the theme settings does not change what is displayed or allow the font to be changed.

Any suggestions as to how this actually works?



_______________________________________________
Tkinter-discuss mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/tkinter-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: problem changing font settings for ttk themed widgets on Windows

willie.lawrence
Hello,
In Windows the fonts are tuples, so you can try:
ttk.Style().configure('TLabelframe.label', font=("Arial", 14, "bold"))
tell if it works
Loading...