Window title change, sorted the entries before displaying
This commit is contained in:
parent
5843f33d28
commit
2652701540
|
@ -10,14 +10,13 @@ import PySimpleGUI as sg
|
|||
Copyright 2020 PySimpleGUI.org
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
|
||||
layout = [[sg.T('This is your layout')],
|
||||
[sg.T('Enter or choose name'), sg.Combo(sg.user_settings_get_entry('names', []), size=(20,1), k='-COMBO-')],
|
||||
[sg.T('Enter or choose name'), sg.Combo(sorted(sg.user_settings_get_entry('names', [])), size=(20,1), k='-COMBO-')],
|
||||
[sg.OK(), sg.Button('Exit')]]
|
||||
|
||||
event, values = sg.Window('Pattern for theme saving', layout).read(close=True)
|
||||
event, values = sg.Window('Pattern for saving with Combobox', layout).read(close=True)
|
||||
|
||||
if event == 'OK':
|
||||
sg.user_settings_set_entry('names', list(set(sg.user_settings_get_entry('names', []) + [values['-COMBO-'],])))
|
||||
|
|
Loading…
Reference in New Issue