Merge pull request #1517 from PySimpleGUI/Dev-latest

Fixed clearing of Output Element using Update method.  Wasn't setting…
This commit is contained in:
MikeTheWatchGuy 2019-06-03 10:27:52 -04:00 committed by GitHub
commit 7ef1793fd8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -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)