How to select or deselect radio button in python / glade

7,003

Like checkboxes, radio buttons also inherit from Gtk.ToggleButton, so you can use the set_active() method to set the status of a radio button. This action causes the “toggled” signal to be emitted.

For example, if we have 3 radio buttons called radio1, radio2, and radio3 in a group, by default the first one in the group would be selected. If we want to select another one, for example, radio3 instead, we should use:

radio3.set_active(True)  

References

Share:
7,003
Majster-pl
Author by

Majster-pl

Updated on September 18, 2022

Comments

  • Majster-pl
    Majster-pl over 1 year

    As in topic, how can I select or deselect radio buttons in python. The application is made by quickly.

    any help pleas ?

  • Majster-pl
    Majster-pl almost 12 years
    That's exactly what I was looking for. Thanks for your help!