Merge pull request #2659 from PySimpleGUI/Dev-latest

Multiline - moved cursor to end  before appending when updating and a…
This commit is contained in:
PySimpleGUI 2020-03-01 13:48:37 -05:00 committed by GitHub
commit 15445538e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

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