From 945625b388a0226e9c5f475c55ff82a4afd7560e Mon Sep 17 00:00:00 2001 From: MikeTheWatchGuy Date: Wed, 22 Aug 2018 14:35:33 -0400 Subject: [PATCH] More Wraplength changes for Text Elements Struggling to get wrapping to work --- PySimpleGUI.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index f2d112ff..c3fb2e94 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1455,7 +1455,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form): # tktext_label = tk.Label(tk_row_frame,anchor=tk.NW, text=display_text, width=width, height=height, justify=tk.LEFT, bd=border_depth) # Set wrap-length for text (in PIXELS) == PAIN IN THE ASS wraplen = tktext_label.winfo_reqwidth() # width of widget in Pixels - tktext_label.configure(anchor=anchor, font=font) # set wrap to width of widget + tktext_label.configure(anchor=anchor, font=font, wraplen=wraplen+10) # set wrap to width of widget if element.BackgroundColor is not None: tktext_label.configure(background=element.BackgroundColor) if element.TextColor != COLOR_SYSTEM_DEFAULT and element.TextColor is not None: