Skip to content Skip to sidebar Skip to footer

How To Deselect A Radio Button Tkinter

I have looked at several online tutorials, none of them seem to work properly, I need to have the radio button deselected once the clear button is clicked. The .deselect() method d

Solution 1:

self.SrcDstport.deselect()

You are trying to deselect the StringVar. You need to set it to something that isn't an option, in other words a value that none of the Radiobuttons use in the value argument:

self.SrcDstport.set(None)

Post a Comment for "How To Deselect A Radio Button Tkinter"