Merge pull request #1521 from PySimpleGUI/Dev-latest

Fix for Text Element wrapping
This commit is contained in:
MikeTheWatchGuy 2019-06-04 10:26:48 -04:00 committed by GitHub
commit 8872ce783d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -5186,6 +5186,8 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
wraplen = tktext_label.winfo_reqwidth() - 10 # width of widget in Pixels
if not auto_size_text and height == 1:
wraplen = 0
else:
wraplen = width
tktext_label.configure(anchor=anchor, wraplen=wraplen) # set wrap to width of widget
if element.Relief is not None:
tktext_label.configure(relief=element.Relief)