From bab87576b21fac2629148be1930cb61838e0f4dc Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Mon, 31 May 2021 15:54:06 -0400 Subject: [PATCH] Set default to be current title --- DemoPrograms/Demo_Desktop_Widget_Count_To_A_Goal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DemoPrograms/Demo_Desktop_Widget_Count_To_A_Goal.py b/DemoPrograms/Demo_Desktop_Widget_Count_To_A_Goal.py index 6e9b2c1b..4cff2f25 100644 --- a/DemoPrograms/Demo_Desktop_Widget_Count_To_A_Goal.py +++ b/DemoPrograms/Demo_Desktop_Widget_Count_To_A_Goal.py @@ -394,7 +394,7 @@ def main(): current_goal = current_goal if current_goal != 0 else 100 sg.user_settings_set_entry('-goal-', current_goal) elif event == 'Choose Title': - new_title = sg.popup_get_text('Choose a title for your date', location=window.current_location(), keep_on_top=True) + new_title = sg.popup_get_text('Choose a title for your date', default_text=sg.user_settings_get_entry('-title-', '') , location=window.current_location(), keep_on_top=True) if new_title is not None: window['-TITLE-'].update(new_title) sg.user_settings_set_entry('-title-', new_title)