Merge pull request #1517 from PySimpleGUI/Dev-latest
Fixed clearing of Output Element using Update method. Wasn't setting…
This commit is contained in:
commit
7ef1793fd8
|
@ -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):
|
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:
|
if value is not None and not append:
|
||||||
self.Widget.set_value(str(value))
|
self.Widget.set_value(str(value))
|
||||||
|
self.CurrentValue = str(value)
|
||||||
elif value is not None and append:
|
elif value is not None and append:
|
||||||
self.CurrentValue = self.CurrentValue + '\n' + str(value)
|
self.CurrentValue = self.CurrentValue + '\n' + str(value)
|
||||||
self.Widget.set_value(self.CurrentValue)
|
self.Widget.set_value(self.CurrentValue)
|
||||||
|
|
Loading…
Reference in New Issue