From 4dc9f5c438b5fd1a7a4f531c65dabaf4d2568e63 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Tue, 3 Mar 2020 17:55:37 -0500 Subject: [PATCH 1/2] Multiline.update - readonly parameter addition --- PySimpleGUIQt/PySimpleGUIQt.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/PySimpleGUIQt/PySimpleGUIQt.py b/PySimpleGUIQt/PySimpleGUIQt.py index 0ae7f99a..6d51f0e9 100644 --- a/PySimpleGUIQt/PySimpleGUIQt.py +++ b/PySimpleGUIQt/PySimpleGUIQt.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -version = __version__ = "0.31.0.9 Unreleased - fix for Listbox.update, Graph.change_coordinates, Added Image.Widget, return correct value with ComboBox has manual data entry, added print_to_element, multlineline update moves cursor to end, scrollable columns, listbox.get, fix for visible ignored in Text Element, Window.read close parm, move cursor to end when default text in Multiline" +version = __version__ = "0.31.0.10 Unreleased - fix for Listbox.update, Graph.change_coordinates, Added Image.Widget, return correct value with ComboBox has manual data entry, added print_to_element, multlineline update moves cursor to end, scrollable columns, listbox.get, fix for visible ignored in Text Element, Window.read close parm, move cursor to end when default text in Multiline, Multiline readonly parm" port = 'PySimpleGUIQt' @@ -1014,7 +1014,7 @@ class Multiline(Element): - def Update(self, value=None, disabled=None, append=False, background_color=None, text_color=None, font=None, text_color_for_value=None, background_color_for_value=None, visible=None): + def Update(self, value=None, disabled=None, append=False, background_color=None, text_color=None, font=None, text_color_for_value=None, background_color_for_value=None, visible=None, readonly=None): """ Changes some of the settings for the Multiline Element. Must call `Window.read` or `Window.finalize` or "finalize" the window using finalize parameter prior @@ -1048,10 +1048,14 @@ class Multiline(Element): self.QT_TextEdit.setTextColor(self.TextColor) if background_color_for_value is not None: self.QT_TextEdit.setTextBackgroundColor(self.BackgroundColor) - if disabled == True: + if disabled is True: self.QT_TextEdit.setDisabled(True) - elif disabled == False: + elif disabled is False: self.QT_TextEdit.setDisabled(False) + if readony is True: + self.QT_TextEdit.setReadOnly(True) + elif readonly is False: + self.QT_TextEdit.setReadOnly(False) super().Update(self.QT_TextEdit, background_color=background_color, text_color=text_color, font=font, visible=visible) From 8895fe7876c0d550127824d3f2d99626b9146871 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Tue, 3 Mar 2020 17:58:34 -0500 Subject: [PATCH 2/2] Typo --- PySimpleGUIQt/PySimpleGUIQt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PySimpleGUIQt/PySimpleGUIQt.py b/PySimpleGUIQt/PySimpleGUIQt.py index 6d51f0e9..0ee709df 100644 --- a/PySimpleGUIQt/PySimpleGUIQt.py +++ b/PySimpleGUIQt/PySimpleGUIQt.py @@ -1052,7 +1052,7 @@ class Multiline(Element): self.QT_TextEdit.setDisabled(True) elif disabled is False: self.QT_TextEdit.setDisabled(False) - if readony is True: + if readonly is True: self.QT_TextEdit.setReadOnly(True) elif readonly is False: self.QT_TextEdit.setReadOnly(False)