Merge pull request #1208 from PySimpleGUI/Dev-latest

Added ability to control autoscroll using Update
This commit is contained in:
MikeTheWatchGuy 2019-03-07 11:03:37 -05:00 committed by GitHub
commit 3a0e204e86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -227,7 +227,6 @@ def RGB(red, green, blue): return '#%02x%02x%02x' % (red, green, blue)
# ------------------------- Button types ------------------------- #
# todo Consider removing the Submit, Cancel types... they are just 'RETURN' type in reality
# uncomment this line and indent to go back to using Enums
# class ButtonType(Enum):
BUTTON_TYPE_BROWSE_FOLDER = 1
BUTTON_TYPE_BROWSE_FILE = 2
BUTTON_TYPE_BROWSE_FILES = 21
@ -1110,7 +1109,9 @@ class Multiline(Element):
text_color=fg, key=key, pad=pad, tooltip=tooltip, font=font or DEFAULT_FONT, visible=visible)
return
def Update(self, value=None, disabled=None, append=False, font=None, text_color=None, background_color=None, visible=None):
def Update(self, value=None, disabled=None, append=False, font=None, text_color=None, background_color=None, visible=None, autoscroll=None):
if autoscroll is not None:
self.Autoscroll = autoscroll
if value is not None:
try:
if not append:
@ -1136,6 +1137,8 @@ class Multiline(Element):
elif visible is True:
self.TKText.pack()
def Get(self):
return self.TKText.get(1.0, tk.END)