is possible to toggle between enable/disable a widget using an option in combobox (optionmenu, dropdown)??
i mean enable it if an option is choosed… with others, disabled…
if yes, how??
i tryed something like this but it didn’t worked…
op = StringVar(root)
op.set("------")
o0 = OptionMenu(root, op, "opt1", "opt2", "opt3","opt4")
if op.get() is "opt1":
e_state = 'ENABLED'
else:
e_state = 'DISABLED'
en9 = Entry(root, width = 30, background = 'white', textvariable = seccion, state=e_state)
Yes, it’s possible. Here’s an example: