From 648294c0fcc73da0a49b68e0d8798d3ee56ad898 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Mon, 3 Jun 2019 10:27:27 -0400 Subject: [PATCH] Fixed clearing of Output Element using Update method. Wasn't setting "CurrentValue" variable, only the widget --- PySimpleGUIWeb/PySimpleGUIWeb.py | 1 + 1 file changed, 1 insertion(+) diff --git a/PySimpleGUIWeb/PySimpleGUIWeb.py b/PySimpleGUIWeb/PySimpleGUIWeb.py index 1468004c..59847223 100644 --- a/PySimpleGUIWeb/PySimpleGUIWeb.py +++ b/PySimpleGUIWeb/PySimpleGUIWeb.py @@ -1305,6 +1305,7 @@ class Output(Element): def Update(self, value=None, disabled=None, append=False, background_color=None, text_color=None, font=None, visible=None): if value is not None and not append: self.Widget.set_value(str(value)) + self.CurrentValue = str(value) elif value is not None and append: self.CurrentValue = self.CurrentValue + '\n' + str(value) self.Widget.set_value(self.CurrentValue)