From a8c3ac1beb528ceb20cd6340bcb3bac726f2d623 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Fri, 15 Nov 2019 14:38:55 -0500 Subject: [PATCH] Removed use of CloseButton for popups that return values. Still have a possible bug in normal popup that uses CloseButton --- PySimpleGUI.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PySimpleGUI.py b/PySimpleGUI.py index 647b0e13..a16b35fe 100644 --- a/PySimpleGUI.py +++ b/PySimpleGUI.py @@ -11267,7 +11267,7 @@ def PopupGetFolder(message, title=None, default_path='', no_window=False, size=( layout = [[Text(message, auto_size_text=True, text_color=text_color, background_color=background_color)], [InputText(default_text=default_path, size=size, key='_INPUT_'), FolderBrowse(initial_folder=initial_folder)], - [CloseButton('Ok', size=(5, 1), bind_return_key=True), CloseButton('Cancel', size=(5, 1))]] + [Button('Ok', size=(5, 1), bind_return_key=True), Button('Cancel', size=(5, 1))]] window = Window(title=title or message, layout=layout, icon=icon, auto_size_text=True, button_color=button_color, background_color=background_color, @@ -11365,7 +11365,7 @@ def PopupGetFile(message, title=None, default_path='', default_extension='', sav layout = [[Text(message, auto_size_text=True, text_color=text_color, background_color=background_color)], [InputText(default_text=default_path, size=size, key='_INPUT_'), browse_button], - [CloseButton('Ok', size=(6, 1), bind_return_key=True), CloseButton('Cancel', size=(6, 1))]] + [Button('Ok', size=(6, 1), bind_return_key=True), Button('Cancel', size=(6, 1))]] window = Window(title=title or message, layout=layout, icon=icon, auto_size_text=True, button_color=button_color, font=font, @@ -11408,7 +11408,7 @@ def PopupGetText(message, title=None, default_text='', password_char='', size=(N layout = [[Text(message, auto_size_text=True, text_color=text_color, background_color=background_color, font=font)], [InputText(default_text=default_text, size=size, key='_INPUT_', password_char=password_char)], - [CloseButton('Ok', size=(5, 1), bind_return_key=True), CloseButton('Cancel', size=(5, 1))]] + [Button('Ok', size=(5, 1), bind_return_key=True), Button('Cancel', size=(5, 1))]] window = Window(title=title or message, layout=layout, icon=icon, auto_size_text=True, button_color=button_color, no_titlebar=no_titlebar,