Search code examples
tkinterfontsdefault

Tkinter Change Label to default font


I am trying to change a Tkinter Label's font to default after a button has been pressed. The Label is initially set as bold, underlined, with font size 10, using the following code

Label32.config(font=('Helvetica', 10, 'bold','underline'))

When the button is pressed the Label should NOT be bold anymore, NOT be underlined anymore, and with font size 8. I am currently using the following code, but it does not work:

Label32.config(font=('TkDefaultFont', 8, 'not bold','not underline'))

I have tried searching but most results pertain to changing Tkinter's default font. Any help would be appreciated.


Solution

  • You just need to set the font to "TkDefaultFont"

    Label32.config(font=('TkDefaultFont'))