From bcdc930b7a278b5ff601b2596654049830c41021 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Mon, 4 Nov 2019 15:05:11 -0500 Subject: [PATCH] Fixed range parm on Slider.Update. Was only changing if value changed too. Now independent. --- PySimpleGUI.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index ac134e3b..d90d9648 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -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): """