Release 0.21.0

This commit is contained in:
MikeTheWatchGuy 2019-04-10 18:42:05 -04:00
parent 5fbb29c82d
commit a87a5d0529
2 changed files with 12 additions and 6 deletions

View File

@ -3294,11 +3294,14 @@ class Window:
self.master_widget.style['background-image'] = "url('{}')".format('/'+self.window.BackgroundImage)
# print(f'background info',self.master_widget.attributes['background-image'] )
# add the following 3 lines to your app and the on_window_close method to make the console close automatically
tag = remi.gui.Tag(_type='script')
tag.add_child("javascript", """window.onunload=function(e){sendCallback('%s','%s');return "close?";};""" % (
str(id(self)), "on_window_close"))
self.master_widget.add_child("onunloadevent", tag)
if not self.window.DisableClose:
# add the following 3 lines to your app and the on_window_close method to make the console close automatically
tag = remi.gui.Tag(_type='script')
tag.add_child("javascript", """window.onunload=function(e){sendCallback('%s','%s');return "close?";};""" % (
str(id(self)), "on_window_close"))
self.master_widget.add_child("onunloadevent", tag)
self.window.MessageQueue.put('Layout complete') # signal the main code that the layout is all done
self.window.master_widget = self.master_widget
return self.master_widget # returning the root widget

View File

@ -8,7 +8,7 @@
![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg)
![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_-0.20.0-orange.svg?longCache=true&style=for-the-badge)
![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_-0.21.0-orange.svg?longCache=true&style=for-the-badge)
@ -288,6 +288,9 @@ New features
* Changed web_update_interval=.0000001 from 0 (YIKES I HOPE SOMETHING DIDN'T BREAK!)
## 0.21.0 10-Apr-2019 PySimpleGUIWeb
* If `disable_close` parameter set in Window call, then Remi will not disconnect when browser closed. Great for reconnecting.
# Design
# Author