From ddb63b4d359ddd041d25b5e588a0e35a110e3ae2 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Sun, 4 Apr 2021 15:33:34 -0400 Subject: [PATCH] Expand listboxes correctly. --- PySimpleGUI.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index e4b30dec..8e5be4c0 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -1,6 +1,6 @@ #!/usr/bin/python3 -version = __version__ = "4.38.0.4 Unreleased\nAdded Element.block_focus to allow blocking an element from getting focus, Listbox now sets the selected colors to be opposite of normal text/background colors, added highlight parms to Listbox so that they can be directly set, gave Mac users the abliity to override the TTK-Buttons-Only rule for Macs so that if forced, a Button CAN use tk buttons on a Mac, exposed listbox_frame for Listbox so can expand a listbox, new parameter right_click_menu_tearoff parm added to Window, better line wrapping for error windows, show an error window if a bad Image specified in the Image element, expand_x & expand_y parms for vtop" +version = __version__ = "4.38.0.5 Unreleased\nAdded Element.block_focus to allow blocking an element from getting focus, Listbox now sets the selected colors to be opposite of normal text/background colors, added highlight parms to Listbox so that they can be directly set, gave Mac users the abliity to override the TTK-Buttons-Only rule for Macs so that if forced, a Button CAN use tk buttons on a Mac, exposed listbox_frame for Listbox so can expand a listbox, new parameter right_click_menu_tearoff parm added to Window, better line wrapping for error windows, show an error window if a bad Image specified in the Image element, expand_x & expand_y parms for vtop vbottom vcenter, added code to element.expand to handle the Listbox correctly" __version__ = version.split()[0] # For PEP 396 and PEP 345 @@ -1260,7 +1260,8 @@ class Element(): return self.Widget.pack(expand=True, fill=fill) self.ParentRowFrame.pack(expand=expand_row, fill=fill) - + if self.Type == ELEM_TYPE_INPUT_LISTBOX: + self.listbox_frame.pack(expand=True, fill=fill) def set_cursor(self,cursor=None, cursor_color=None): """