in the following code i want to be able to change the value of the combo box and immediately have a labels and entry boxes put on the form. the code that i tried using is not working as intended but i am not getting any errors.
nb = ttk.Notebook(root)
nb.grid(row=1, column=0, columnspan=50, rowspan=49, sticky='NESW')
page1 = ttk.Frame(nb, style='body.TFrame')
nb.add(page1, text='Create Tasks')
specify = StringVar()
site_lbl = Label(page1, text="Site", bg='#1C2833', fg='#FDFEFE', font=("Helvetica", 14))
site_lbl.place(x=5, y=20)
site_combo = ttk.Combobox(page1, width=15, values=[
'YeezySupply'
])
site_combo.place(x=55, y=25)
def add_store_options_ys():
if specify.get() == 'YeezySupply':
stylecode_lbl = Label(page1, text="Site", bg='#1C2833', fg='#FDFEFE', font=("Helvetica", 14))
stylecode_lbl.place(x=5, y=20)
stylecode_entry = Entry(page1, width=15, bg='#1C2833', fg='#FDFEFE', font=("Helvetica", 8))
stylecode_entry.place(x=55, y=25)
specify.trace_variable("w", add_store_options_ys)
I know i could do this by using a button to then call the function but i dont want to use a button and i want it to check automatically and then update the page with the labels and entry box.