Replies: 1 comment 1 reply
-
@lfgogogo You have to use Here should be the modification: def switch_callback():
state=switch_1.get()
print(state)
if state=='on':
entry_2.configure(state=tkinter.NORMAL)
button_2.configure(state=tkinter.NORMAL)
else:
entry_2.configure(state=tkinter.DISABLED)
button_2.configure(state=tkinter.DISABLED) |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,i am using CustomTkinter to design a UI,and want to use a CTkSwitch to control a CTkButton and CTkEntry,if the switch is on ,button and entry get tkinter.NORMAL state,otherwise disabled,i don't know whether this is supported or not.I find when the switch is on,the button is still 'disabled' but can be clicked,the entry is still disabled.Here is my code:
Beta Was this translation helpful? Give feedback.
All reactions