From 3b093e1c4ae84106ed1e8c4d90f14db5e3969a05 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Sun, 15 Aug 2021 17:53:35 -0400 Subject: [PATCH] Renamed the user settings key for window location to '-location-' --- DemoPrograms/Demo_Auto_Save_Window_Position.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DemoPrograms/Demo_Auto_Save_Window_Position.py b/DemoPrograms/Demo_Auto_Save_Window_Position.py index e83314c1..ef7f6368 100644 --- a/DemoPrograms/Demo_Auto_Save_Window_Position.py +++ b/DemoPrograms/Demo_Auto_Save_Window_Position.py @@ -17,13 +17,13 @@ import PySimpleGUI as sg layout = [[sg.Text('Window that Auto-saves position', font='_ 25')], [sg.Button('Ok'), sg.Button('Exit')]] -window = sg.Window('Auto-saves Location', layout, enable_close_attempted_event=True, location=sg.user_settings_get_entry('-position-', (None, None))) +window = sg.Window('Auto-saves Location', layout, enable_close_attempted_event=True, location=sg.user_settings_get_entry('-location-', (None, None))) while True: event, values = window.read() print(event, values) if event in ('Exit', sg.WINDOW_CLOSE_ATTEMPTED_EVENT): - sg.user_settings_set_entry('-position-', window.current_location()) # The line of code to save the position before exiting + sg.user_settings_set_entry('-location-', window.current_location()) # The line of code to save the position before exiting break window.close()