From 080450c6913d79d92df69df44b0410d268e00145 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Mon, 10 Sep 2018 17:35:21 -0400 Subject: [PATCH] Fix for button not updating when Update changed the text --- Demo_Desktop_Widget_Timer.py | 1 - PySimpleGUI.py | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/Demo_Desktop_Widget_Timer.py b/Demo_Desktop_Widget_Timer.py index 3fc230ab..149f89d7 100644 --- a/Demo_Desktop_Widget_Timer.py +++ b/Demo_Desktop_Widget_Timer.py @@ -37,7 +37,6 @@ def Timer(): current_time = int(round(time.time()*100)) - start_time else: button, values = form.Read() - # --------- Do Button Operations -------- if values is None or button == 'Exit': break diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 0c3dfb2c..273018d8 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -924,6 +924,7 @@ class Button(Element): try: if new_text is not None: self.TKButton.configure(text=new_text) + self.ButtonText = new_text if button_color != (None, None): self.TKButton.config(foreground=button_color[0], background=button_color[1]) except: