jarvisteach / appJar

Simple Tkinter GUIs in Python
http://appJar.info
Other
615 stars 68 forks source link

Unable to change font through config in ttk mode #575

Closed EnderDas closed 4 years ago

EnderDas commented 5 years ago

Unable to change font through config in ttk mode

I noticed that having Ttk theme enabled causes setFont and functions called in it to fail and not update fonts

.config() does however work, mind that size does not work with .config if not given family keyword.

EDIT:

to clarify the above sentence as i now realize its hard to read doing app.getButtonWidget("button").config(font="Arial 20")) works but app.getButtonWidget("button").config(font="20")) does not

jarvisteach commented 5 years ago

I'm not sure that either of those should work in ttk mode. In ttk mode, you need to apply different styles: http://appjar.info/pythonTtk/

jarvisteach commented 5 years ago

To be clear, you can use the following to change the style of buttons:

app.ttkStyle.configure("TButton", foreground="green", background="blue", font=('Helvetica', 20))
jarvisteach commented 4 years ago

Closing, as no more discussion