Hi this is @mondalraif450.
I having an issue regarding disabling multiple radio buttons, in case if the user clicks on any one of the radio buttons.
Code:
def new_user():
intro2 = Label(root, text="#Create Your Account", font="Times", bg="white", fg="blue", relief=SUNKEN, bd=10)
intro2.pack(anchor=N)
# Creating the user insert box to insert the user's name
user_weight = LabelFrame(root).pack(anchor=CENTER)
first_name_user = Label(user_weight, text="First Name", bg="red", fg="white", font="Times").pack(anchor=CENTER)
first_name_user_input = Entry(user_weight, bg="white", fg="black", relief=SUNKEN).pack(anchor=CENTER)
last_name_user = Label(user_weight, text="Last Name", bg="red", fg="white", font="Times").pack(anchor=CENTER)
last_name_user_input = Entry(user_weight, bg="white", fg="black", relief=SUNKEN).pack(anchor=CENTER)
user_weight
user_new.configure(state=DISABLED)
root2.mainloop()
#Creating a function for opening new window to access data for old users
def old_user():
intro3 = Label(root, text="#User Validation", font="Times", bg="white", fg="blue", relief=SUNKEN, bd=10)
intro3.pack(anchor=N)
user_name = Label(root, text="Please enter your username below", font="Ariel", bg="red", fg="white")
user_pass = Label(root, text="Please enter your passcode below", font="Ariel", bg="red", fg="white")
user_name_input = Entry(root, bg="white", fg="black", justify=CENTER, relief=SUNKEN)
user_pass_input = Entry(root, show="*", bg="white", fg="black", justify=CENTER, relief=SUNKEN)
user_name.pack(anchor=CENTER)
user_name_input.pack(anchor=CENTER)
user_pass.pack(anchor=CENTER)
user_pass_input.pack(anchor=CENTER)
user_old.configure(state=DISABLED)
root3.mainloop()
var = IntVar
# Creating RadioButton Regarding the choice of users ( ON ROOT WINDOW )
user_new = Radiobutton(root, text="New User", variable=var, value=1, bg="red",relief=FLAT, command=new_user)
user_old = Radiobutton(root, text="Existing User", variable=var, value=2, bg="red", command=old_user)
user_new.pack(anchor=W)
user_old.pack(anchor=W)
I just want to disable user_new, if the user clicks on user_old and vice versa.