From 738f2658e4dc5f5d6234dc628e8179d8a29ade10 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Fri, 18 Jun 2021 18:47:48 -0400 Subject: [PATCH] Combo and Input elements - fixed for readonly state use when disable/enable in update --- PySimpleGUI.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 159ebd04..07286ba5 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -version = __version__ = "4.44.0.8 Unreleased\nWindow.current_location docstring update to indicate value my be off due to titlebar, Menu element fixed problem of updates modifying the original menu spec, better string length handling in error popups, New popup function - popup_error_with_traceback allows you to show error info with a button to take the user to the line with the problem, replaced error popups with traceback popups when button colors problems are detected, fix for Menu.update - wasn't setting the colors and font correctly, title parm in the docstring, menu tearoff location fix after update with new menu def, Output element docstring update indicating Multiline is the superior choice, set no titlebar settings twice now due to a Raspberry Pi problem" +version = __version__ = "4.44.0.9 Unreleased\nWindow.current_location docstring update to indicate value my be off due to titlebar, Menu element fixed problem of updates modifying the original menu spec, better string length handling in error popups, New popup function - popup_error_with_traceback allows you to show error info with a button to take the user to the line with the problem, replaced error popups with traceback popups when button colors problems are detected, fix for Menu.update - wasn't setting the colors and font correctly, title parm in the docstring, menu tearoff location fix after update with new menu def, Output element docstring update indicating Multiline is the superior choice, set no titlebar settings twice now due to a Raspberry Pi problem, fix for Combo and Input elements readonly state not being recalled when updating disabled." __version__ = version.split()[0] # For PEP 396 and PEP 345 @@ -1535,7 +1535,7 @@ class Input(Element): if disabled is True: self.TKEntry['state'] = 'readonly' if self.UseReadonlyForDisable else 'disabled' elif disabled is False: - self.TKEntry['state'] = 'normal' + self.TKEntry['state'] = 'readonly' if self.ReadOnly else 'normal' if background_color not in (None, COLOR_SYSTEM_DEFAULT): self.TKEntry.configure(background=background_color) if text_color not in (None, COLOR_SYSTEM_DEFAULT): @@ -1725,7 +1725,7 @@ class Combo(Element): self.TKCombo['state'] = 'enable' if disabled is True: self.TKCombo['state'] = 'disable' - elif disabled is False and not readonly: + elif disabled is False and not self.Readonly: self.TKCombo['state'] = 'enable' if font is not None: self.TKCombo.configure(font=font)