I have made a program in Python 3 and Tkinter, which is using radio buttons. Now, how can I make that some of the radio buttons are already checked?
1 Answer
You want to use the select method on the a radio button like so:
import tkinter as tk
root = tk.Tk()
root.title("Radio Button Example")
button = tk.Radiobutton(root) # Make a radio button
button.pack() # Pack it to the screen
button.select() #This is the bit that makes it checked
root.mainloop()
For some more information about RadioButtons in tk check out this page on tutorials point: