Skip to content
Advertisement

Python, Tkinter – Enable/Disable buttons only when a radio button is selected

So here’s my code

JavaScript

What I’m trying to do is have the buttons enabled when the radio buttons are selected. Here’s what I tried.

JavaScript

I believe this only sets it initially, and when I select a radio button or change it, it doesn’t update. I think I can use command inside the buttons but don’t understand how to go about it.

Advertisement

Answer

I added four function., Then in Radiobutton, I added command=changeState for each Radiobuuton.

Try this:

JavaScript
Advertisement