Merge pull request #4432 from PySimpleGUI/Dev-latest

Combo and Input elements - fixed for readonly state use when disable/…
This commit is contained in:
PySimpleGUI 2021-06-18 18:48:05 -04:00 committed by GitHub
commit 9f5a51cbb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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)