From 88ed763023150f193f353da40f025164f252f59e Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Thu, 18 Mar 2021 21:34:19 -0400 Subject: [PATCH] Open get title and get date windows at same location as the main window --- DemoPrograms/Demo_Desktop_Widget_Days_Counter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DemoPrograms/Demo_Desktop_Widget_Days_Counter.py b/DemoPrograms/Demo_Desktop_Widget_Days_Counter.py index 5a9d690b..bebdf2c2 100644 --- a/DemoPrograms/Demo_Desktop_Widget_Days_Counter.py +++ b/DemoPrograms/Demo_Desktop_Widget_Days_Counter.py @@ -99,12 +99,12 @@ def main(location): if event == 'Edit Me': sg.execute_editor(__file__) elif event == 'Choose Date': - new_start = sg.popup_get_date() + new_start = sg.popup_get_date(location=window.current_location()) if new_start is not None: start_date = datetime.datetime(new_start[2], new_start[0], new_start[1]) sg.user_settings_set_entry('-start date-', new_start) elif event == 'Choose Title': - new_title = sg.popup_get_text('Choose a title for your date') + new_title = sg.popup_get_text('Choose a title for your date', location=window.current_location()) if new_title is not None: window['-TITLE-'].update(new_title) sg.user_settings_set_entry('-title-', new_title)