Python - Radio Button Introduction

Tkinter Radio Button

The Radiobutton is a standard Tkinter widget used to implement one-of-many selections. Radiobuttons can contain text or images, and you can associate a Python function or method with each button. When the button is pressed, Tkinter automatically calls that function or method.

The button can only display text in a single font. A Python function or method can be associated with a radio button. This function or method will be called, if you press this radio button.

Syntax:

                   
 w = Radiobutton(top, options)


Example 1:

Output:


Example 2:

Output:


Example 3:

Output: