From e4125886a3727a5e13698270764a4bfcf1395253 Mon Sep 17 00:00:00 2001 From: PySimpleGUI Date: Sat, 3 Jul 2021 14:29:14 -0400 Subject: [PATCH] Sort the list of entries --- DemoPrograms/Demo_Combo_Filechooser_With_History_And_Clear.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DemoPrograms/Demo_Combo_Filechooser_With_History_And_Clear.py b/DemoPrograms/Demo_Combo_Filechooser_With_History_And_Clear.py index 394cf359..3ba65023 100644 --- a/DemoPrograms/Demo_Combo_Filechooser_With_History_And_Clear.py +++ b/DemoPrograms/Demo_Combo_Filechooser_With_History_And_Clear.py @@ -21,7 +21,7 @@ import PySimpleGUI as sg -layout = [[sg.Combo(sg.user_settings_get_entry('-filenames-', []), default_value=sg.user_settings_get_entry('-last filename-', ''), size=(50, 1), key='-FILENAME-'), sg.FileBrowse(), sg.B('Clear History')], +layout = [[sg.Combo(sorted(sg.user_settings_get_entry('-filenames-', [])), default_value=sg.user_settings_get_entry('-last filename-', ''), size=(50, 1), key='-FILENAME-'), sg.FileBrowse(), sg.B('Clear History')], [sg.Button('Ok'), sg.Button('Cancel')]] window = sg.Window('Filename Chooser With History', layout)