Merge pull request #2137 from PySimpleGUI/Dev-latest

Fixed range parm on Slider.Update.  Was only changing if value change…
This commit is contained in:
PySimpleGUI 2019-11-04 15:08:17 -05:00 committed by GitHub
commit 478a8d4a3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,6 @@
#!/usr/bin/python3
version = __version__ = "4.5.0.26 Unreleased Mac Buttons. Element size get/set. Screen Size. hide/unhide row, Button rebinding, Element.expand, Experimental Finalize, Update parms added for Input, Frame, delete window when close"
version = __version__ = "4.5.0.27 Unreleased Mac Buttons. Element size get/set. Screen Size. hide/unhide row, Button rebinding, Element.expand, Experimental Finalize, Update parms added for Input, Frame, delete window when close, Slider.Update range parm"
# 888888ba .d88888b oo dP .88888. dP dP dP
@ -3867,8 +3867,6 @@ class Slider(Element):
if value is not None:
try:
self.TKIntVar.set(value)
if range != (None, None):
self.TKScale.config(from_=range[0], to_=range[1])
except:
pass
self.DefaultValue = value
@ -3880,6 +3878,10 @@ class Slider(Element):
self.TKScale.pack_forget()
elif visible is True:
self.TKScale.pack()
if range != (None, None):
self.TKScale.config(from_=range[0], to_=range[1])
def _SliderChangedHandler(self, event):
"""