From b33f92ce114cf2266fd5f6c1a19e80e948201736 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Sat, 23 Mar 2019 18:49:35 -0400 Subject: [PATCH 1/2] Release 0.10.0 --- PySimpleGUIWx/readme.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/PySimpleGUIWx/readme.md b/PySimpleGUIWx/readme.md index 03ceed96..28de0fe3 100644 --- a/PySimpleGUIWx/readme.md +++ b/PySimpleGUIWx/readme.md @@ -7,7 +7,7 @@ ![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.8.0-orange.svg?longCache=true&style=for-the-badge) +![Python Version](https://img.shields.io/badge/PySimpleGUIWx_For_Python_3.x_Version-0.10.0-orange.svg?longCache=true&style=for-the-badge) @@ -345,6 +345,21 @@ Starting with release 0.4.0, most of the Popup functions work. This means you c * Added Try around reading multiline input value - not sure why needed * OneLineProgressMeter - can update text on every call now +### 0.9.0 06-Mar-2019 PySimpleGUIWx + +* Addition of Assert Suppression + * This was needed for a multi-threaded version of PySimpleGUIWx + * Complained when exiting a system tray if did not make this change and ran the tray in a thread +* Tray.Close now correctly Hides the icon +* SetGlobalIcon functional +* Can also now set icon using SetOptions call + + +### 0.10.0 23-Mar-2019 PySimpleGUIWx + +* `do_not_clear` is now TRUE by default on Input and Multiline elements!! + + # Design From 680e4ca1ca09bb1d59d678e7bf79a07c0336afcd Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Sun, 24 Mar 2019 11:11:03 -0400 Subject: [PATCH 2/2] Fix for OptionMenu not Updating correctly to new values --- PySimpleGUI.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index e340fa0a..61306f7c 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -718,7 +718,7 @@ class OptionMenu(Element): ''' self.Values = values self.DefaultValue = default_value - self.TKOptionMenu = None + self.TKOptionMenu = None # type: tk.OptionMenu self.Disabled = disabled bg = background_color if background_color else DEFAULT_INPUT_ELEMENTS_COLOR fg = text_color if text_color is not None else DEFAULT_INPUT_TEXT_COLOR @@ -729,6 +729,13 @@ class OptionMenu(Element): def Update(self, value=None, values=None, disabled=None, visible=None): if values is not None: self.Values = values + self.TKOptionMenu['menu'].delete(0, 'end') + + # Insert list of new options (tk._setit hooks them up to var) + self.TKStringVar.set(self.Values[0]) + for new_value in self.Values: + self.TKOptionMenu['menu'].add_command(label=new_value, command=tk._setit(self.TKStringVar, new_value)) + if self.Values is not None: for index, v in enumerate(self.Values): if v == value: