From 8c8a0504ad6aafb60c3b720828a77e3225996c6a Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Sun, 10 Jan 2021 11:39:56 -0500 Subject: [PATCH] Fix so that it updates font correctly --- DemoPrograms/Demo_Font_String.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DemoPrograms/Demo_Font_String.py b/DemoPrograms/Demo_Font_String.py index 57c6d2fc..73385a92 100644 --- a/DemoPrograms/Demo_Font_String.py +++ b/DemoPrograms/Demo_Font_String.py @@ -23,14 +23,14 @@ while True: # Event Loop if event in (sg.WIN_CLOSED, 'Exit'): break font_string = 'Helvitica ' - font_string += str(values['-slider-']) + font_string += str(int(values['-slider-'])) if values['-bold-']: font_string += ' bold' if values['-italics-']: font_string += ' italic' if values['-underline-']: font_string += ' underline' - text_elem.update(font=int(font_string.split(' ')[1].split('.')[0])) + text_elem.update(font=font_string) window['-fontstring-'].update('"'+font_string+'"') print(event, values)