Skip to content

Commit

Permalink
Added ability to control autoscroll using Update
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeTheWatchGuy committed Mar 7, 2019
1 parent 673f5f6 commit e68278b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions PySimpleGUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1110,7 +1109,9 @@ def __init__(self, default_text='', enter_submits=False, disabled=False, autoscr
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:
Expand All @@ -1136,6 +1137,8 @@ def Update(self, value=None, disabled=None, append=False, font=None, text_color=
elif visible is True:
self.TKText.pack()



def Get(self):
return self.TKText.get(1.0, tk.END)

Expand Down

0 comments on commit e68278b

Please sign in to comment.