Merge pull request #2864 from PySimpleGUI/Dev-latest

Dev latest
This commit is contained in:
PySimpleGUI 2020-05-06 16:00:22 -04:00 committed by GitHub
commit dc8ea92570
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 103 additions and 14 deletions

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
version = __version__ = "0.32.0.1 Unreleased - Experimental ability for user to add widgets to layout"
version = __version__ = "0.33.0 Released 6-May-2020"
port = 'PySimpleGUIQt'
@ -348,6 +348,8 @@ class Element():
self.TooltipObject = None
self.Visible = visible
self.metadata = metadata # type: Any
self.row_frame = None # type: QHBoxLayout
def _FindReturnKeyBoundButton(self, form):
for row in form.Rows:
@ -4800,7 +4802,7 @@ def PackFormIntoFrame(window, containing_frame, toplevel_win):
qt_row_layout = QHBoxLayout()
for col_num, element in enumerate(flex_row):
element.ParentForm = toplevel_win # save the button's parent form object
element.parent_row_frame = element.ParentRowFrame = qt_row_layout
element.row_frame = qt_row_layout
if toplevel_win.Font and (element.Font == DEFAULT_FONT or not element.Font):
font = toplevel_win.Font
element.Font = font
@ -8650,7 +8652,6 @@ def main():
if event == 'About...':
Popup('You are running PySimpleGUIQt', 'The version number is', version)
if not graph_paused:
i += 1
if i < 600:
graph_elem.DrawLine((i, 0), (i, randint(0, 300)), width=1,
@ -8662,6 +8663,7 @@ def main():
window.FindElement('+PROGRESS+').UpdateBar(i % 600)
window.FindElement('_PROGTEXT_').Update((i % 600) // 6)
i += 1
# TimerStop()
window.Close()

View File

@ -803,6 +803,18 @@ Highlights - Read with close (Single line GUIs!), Print to Multiline, Scrollable
* Print (Multiline) added autoscroll parm
## 0.33.0 PySimpleGUIQt 6-May-2020
* Added constants
* WIN_CLOSED and WINDOW_CLOSED
* EVENT_TIMEOUT and TIMEOUT_EVENT
* Added expansion capabilities
* Element.row_frame - The QHBoxLayout the element is contained within
* Column.vbox_layout - The QVBoxLayout contained in Column element
# Design
## Author

View File

@ -1,6 +1,6 @@
#usr/bin/python3
version = __version__ = "0.37.0.1 Unreleased - Added close parameter to Window.read"
version = __version__ = "0.38.0 Released 06-May-2020"
port = 'PySimpleGUIWeb'
@ -210,7 +210,10 @@ MESSAGE_BOX_LINE_WIDTH = 60
# "Special" Key Values.. reserved
# Key representing a Read timeout
TIMEOUT_KEY = '__TIMEOUT__'
EVENT_TIMEOUT = TIMEOUT_EVENT = TIMEOUT_KEY = '__TIMEOUT__'
# Window closed event (user closed with X or destroyed using OS)
WIN_CLOSED = WINDOW_CLOSED = None
# Key indicating should not create any return values for element
WRITE_ONLY_KEY = '__WRITE ONLY__'

View File

@ -8,9 +8,8 @@
![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg)
![Python Version](https://img.shields.io/badge/PySimpleGUIWeb_-0.36.0-orange.svg?longCache=true&style=for-the-badge)
[![PyPI Version](https://img.shields.io/pypi/v/pysimpleguiweb.svg?style=for-the-badge)](https://pypi.org/project/pysimpleguiweb/)
# PySimpleGUIWeb
@ -450,8 +449,32 @@ Themes +
* Fix for Text element crashing following the Remi 2020.2.5 release
* Crash will show trying to use method "set_layout_orientation"
## 0.37.0 PySimpleGUIWeb 14-Apr-2020
Catching up to latest Remi releases.
* NO LONGER ADDING \n TO MULTILINE, MULTILINE_OUTPUT UPDATES
* This may cause some of your problems. Sorry about this, but it's the right thing to do so that prints work correctly
* Multiline.print capability
* MultilineOutput.print capability
* Fix for MultilineOutput not autoscrolling
* Fix for image update flicker
* Printing sep char fixed
* Fix for extra Tab
* Replaced SvgGroup with SvgSubcontainer (Requires Remi 2020.3.10)
* BIG Thank You owed to Remi creator Davide (for this and many other releases too)
## 0.38.0 PySimpleGUIWeb 6-May-2020
* Added constants
* WIN_CLOSED and WINDOW_CLOSED
* EVENT_TIMEOUT and TIMEOUT_EVENT
# Design
# Design
# Author
Mike B.
@ -460,3 +483,4 @@ Themes +
GNU Lesser General Public License (LGPL 3) +
# Acknowledgments
This could not be possible without the Remi project! Thank you Remi!!!!

View File

@ -1,5 +1,5 @@
#!/usr/bin/python3
version = __version__ = "0.15.0 Released 24-Dec-2019 Themes"
version = __version__ = "0.16.0 Released 06-May-2020"
port = 'PySimpleGUIWx'
@ -203,7 +203,10 @@ MESSAGE_BOX_LINE_WIDTH = 60
# "Special" Key Values.. reserved
# Key representing a Read timeout
TIMEOUT_KEY = '__TIMEOUT__'
EVENT_TIMEOUT = TIMEOUT_EVENT = TIMEOUT_KEY = '__TIMEOUT__'
# Window closed event (user closed with X or destroyed using OS)
WIN_CLOSED = WINDOW_CLOSED = None
# Key indicating should not create any return values for element
WRITE_ONLY_KEY = '__WRITE ONLY__'
EVENT_SYSTEM_TRAY_ICON_DOUBLE_CLICKED = '__DOUBLE_CLICKED__'
@ -1792,6 +1795,18 @@ class Graph(Element):
return None
self._TKCanvas2.move(figure, shift_amount[0], shift_amount[1])
def change_coordinates(self, graph_bottom_left, graph_top_right):
"""
Changes the corrdinate system to a new one. The same 2 points in space are used to define the coorinate
system - the bottom left and the top right values of your graph.
:param graph_bottom_left: Tuple[int, int] (x,y) The bottoms left corner of your coordinate system
:param graph_top_right: Tuple[int, int] (x,y) The top right corner of your coordinate system
"""
self.BottomLeft = graph_bottom_left
self.TopRight = graph_top_right
@property
def TKCanvas(self):
if self._TKCanvas2 is None:
@ -3030,7 +3045,30 @@ class Window:
if event.ClassName != 'wxMouseEvent':
event.DoAllowNextEvent()
def Read(self, timeout=None, timeout_key=TIMEOUT_KEY):
def Read(self, timeout=None, timeout_key=TIMEOUT_KEY, close=False):
"""
THE biggest deal method in the Window class! This is how you get all of your data from your Window.
Pass in a timeout (in milliseconds) to wait for a maximum of timeout milliseconds. Will return timeout_key
if no other GUI events happen first.
Use the close parameter to close the window after reading
:param timeout: (int) Milliseconds to wait until the Read will return IF no other GUI events happen first
:param timeout_key: (Any) The value that will be returned from the call if the timer expired
:param close: (bool) if True the window will be closed prior to returning
:return: Tuple[(Any), Union[Dict[Any:Any]], List[Any], None] (event, values)
"""
results = self._read(timeout=timeout, timeout_key=timeout_key)
if close:
self.close()
return results
def _read(self, timeout=None, timeout_key=TIMEOUT_KEY):
if timeout == 0: # timeout of zero runs the old readnonblocking
event, values = self._ReadNonBlocking()
if event is None:

View File

@ -7,8 +7,8 @@
![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg)
![Python Version](https://img.shields.io/badge/PySimpleGUIWx_For_Python_3.x_Version-0.15.0-orange.svg?longCache=true&style=for-the-badge)
[![PyPI Version](https://img.shields.io/pypi/v/pysimpleguiwx.svg?style=for-the-badge)](https://pypi.org/project/pysimpleguiwx/)
# PySimpleGUIWx
@ -418,6 +418,16 @@ Themes!
* Frame Element! BUT, it's only a partial solution as I am unable to set the background color (need to understand how panels work). It's better than nothing
## 0.16.0 PySimpleGUIWx 6-May-2020
* Added constants
* WIN_CLOSED and WINDOW_CLOSED
* EVENT_TIMEOUT and TIMEOUT_EVENT
* Added Graph.change_coordinates method
* Added close parameter to Window.read
# Design
# Author
Mike B.