Merge pull request #720 from MikeTheWatchGuy/Dev-latest

Dev latest
This commit is contained in:
MikeTheWatchGuy 2018-11-14 09:14:16 -05:00 committed by GitHub
commit 5ac08aff56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 37 additions and 14 deletions

View file

@ -190,7 +190,6 @@ class MyWindows():
self.NumOpenWindows = 0
self.user_defined_icon = None
self.hidden_master_root = None
self.window_being_closed = None
def Decrement(self):
self.NumOpenWindows -= 1 * (self.NumOpenWindows != 0) # decrement if not 0
@ -1204,6 +1203,16 @@ class Output(Element):
print('*** form = sg.Window("My Form").Layout(layout).Finalize() ***')
return self._TKOut
def Update(self, value=None):
if value is not None:
# try:
self._TKOut.output.delete('1.0', tk.END)
self._TKOut.output.insert(tk.END, value)
# except:
# pass
def __del__(self):
try:
self._TKOut.__del__()
@ -3236,7 +3245,6 @@ class Window:
global _my_windows
if self.DisableClose:
return
_my_windows.window_being_closed = self
# print('Got closing callback')
if self.CurrentlyRunningMainloop: # quit if this is the current mainloop, otherwise don't quit!
self.TKroot.quit() # kick the users out of the mainloop