There are two radiobutton

the_radiobutton_boy = Radiobutton(root, text='Boy', variable=r, value=1) the_radiobutton_girl = Radiobutton(root, text='Girl', variable=r, value=2) 

you need one of them to be selected by default.

Is there such a method for Radiobutton?

If not, how best to implement it?

    1 answer 1

    You can set the value for an object of the variable r immediately after its determination

     r = tk.IntVar() r.set(1) 

    and widgets will display the current status.

    • Thank! It helped!) - 770001