From 45c58c57e86959a81b1d58116ad31c0828b7cd8f Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Sun, 1 Mar 2020 13:48:10 -0500 Subject: [PATCH] Multiline - moved cursor to end before appending when updating and appending --- PySimpleGUIQt/PySimpleGUIQt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PySimpleGUIQt/PySimpleGUIQt.py b/PySimpleGUIQt/PySimpleGUIQt.py index 3c76b8f1..0ae7f99a 100644 --- a/PySimpleGUIQt/PySimpleGUIQt.py +++ b/PySimpleGUIQt/PySimpleGUIQt.py @@ -1040,6 +1040,7 @@ class Multiline(Element): self.QT_TextEdit.setTextColor(text_color_for_value) if background_color_for_value is not None: self.QT_TextEdit.setTextBackgroundColor(background_color_for_value) + self.QT_TextEdit.moveCursor(QtGui.QTextCursor.End) self.QT_TextEdit.insertPlainText(str(value)) if self.Autoscroll: self.QT_TextEdit.moveCursor(QtGui.QTextCursor.End) @@ -5146,7 +5147,6 @@ def PackFormIntoFrame(window, containing_frame, toplevel_win): toplevel_win.FocusElement = element.QT_TextEdit element.QT_TextEdit.setText(str(default_text)) - element.QT_TextEdit.moveCursor(QtGui.QTextCursor.End) if element.Tooltip: element.QT_TextEdit.setToolTip(element.Tooltip) # qt_row_layout.setContentsMargins(*full_element_pad)