From 0ec5aced5013881adf00b4d1781238ea9c281c68 Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Sat, 5 Jan 2019 09:51:25 -0500 Subject: [PATCH] Fix for scale not returning float values --- PySimpleGUI.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 22a8ff22..774ed1ee 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -4344,7 +4344,7 @@ def BuildResultsForSubform(form, initialize_only, top_level_form): value = 0 elif element.Type == ELEM_TYPE_INPUT_SLIDER: try: - value = element.TKIntVar.get() + value = float(element.TKScale.get()) except: value = 0 elif element.Type == ELEM_TYPE_INPUT_MULTILINE: @@ -5033,6 +5033,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form:Window): 'sticky': 'nswe'})]) # Copy default TCombobox settings + # Getting an error on this line of code # combostyle.configure(style_name, *combostyle.configure("TCombobox")) # Set individual widget options