Removed use of CloseButton for popups that return values. Still have a possible bug in normal popup that uses CloseButton

This commit is contained in:
PySimpleGUI 2019-11-15 14:38:55 -05:00
parent e5dc2c45e3
commit a8c3ac1beb
1 changed files with 3 additions and 3 deletions

View File

@ -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,