commit
e38dc6c89d
|
@ -718,7 +718,7 @@ class OptionMenu(Element):
|
||||||
'''
|
'''
|
||||||
self.Values = values
|
self.Values = values
|
||||||
self.DefaultValue = default_value
|
self.DefaultValue = default_value
|
||||||
self.TKOptionMenu = None
|
self.TKOptionMenu = None # type: tk.OptionMenu
|
||||||
self.Disabled = disabled
|
self.Disabled = disabled
|
||||||
bg = background_color if background_color else DEFAULT_INPUT_ELEMENTS_COLOR
|
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
|
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):
|
def Update(self, value=None, values=None, disabled=None, visible=None):
|
||||||
if values is not None:
|
if values is not None:
|
||||||
self.Values = values
|
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:
|
if self.Values is not None:
|
||||||
for index, v in enumerate(self.Values):
|
for index, v in enumerate(self.Values):
|
||||||
if v == value:
|
if v == value:
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg)
|
![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
|
* Added Try around reading multiline input value - not sure why needed
|
||||||
* OneLineProgressMeter - can update text on every call now
|
* 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
|
# Design
|
||||||
|
|
Loading…
Reference in New Issue