# RadioButton (Python)

Marta Maria Casetti
mmcasetti@gmail.com 2012
Mutually exclusive buttons.

# RadioButton

Three RadioButtons. You can see in the terminal if they are turned off or on.

# Code used to generate this example

# Useful methods for a RadioButton widget

For an explanation of signals and callback functions, see this page.

Instead of `button1 = Gtk.RadioButton(label="Button 1")` we could create the button and label it with

button1 = Gtk.RadioButton() button1.set_label("Button 1").

For a general discussion of this, see here.

Yet another way to create a new RadioButton with a label is `button1 = Gtk.RadioButton.new_with_label(None, "Button 1")` (the first arguement is the group of the radiobuttons, which we can get with `get_group()`, the second argument is the label).

# API References

In this sample we used the following:

GtkWindow

GtkGrid

GtkRadioButton