I have a dictionary with information :
Facets = {
'Entity' : {'facet_type': 'Entity' , 'facet_parameters': ['IFC Class' , 'Predefined Type']},
'Attribute' : {'facet_type': 'Attribute' , 'facet_parameters': ['Name' , 'Value']},
'Classification': {'facet_type': 'Classification', 'facet_parameters': ['System' , 'Value']},
'Property' : {'facet_type': 'Property' , 'facet_parameters': ['Property Set', 'Name', 'Value']},
'Material' : {'facet_type': 'Material' , 'facet_parameters': ['Value']},
'Parts' : {'facet_type': 'Parts' , 'facet_parameters': ['Entity' , 'Relationship']}
}
I want to create an (IDS) editor using pySimpleGUI. People should select the facet_type and then be able to enter the facet_parameters themself.
so in layout the following allow them to select the correct facet_type :
layout = [[sg.Text('All elements of'),
sg.Combo(sorted(Facets.keys()),key='-FACET-', enable_events=True)]]
And then in the while loop I want that for each parameter in the facet parameters, it gives an imput box but I cant do it
window = sg.Window('IDS', layout,resizable=True)
while True:
event, values = window.read()
if event == sg.WINDOW_CLOSED:
break
elif event == '-FACET-':
selected_facet = values['-FACET-']
facet_parameters = Facets[selected_facet]['facet_parameters']
So far I am stuck here and can't produce any piece of code that would update the layout to add something like that (screenshot to explain) :
Thank you for your time.

