[pygtk] Can I change a radio button's group?

John Finlay finlay at moeraki.com
Fri Jun 9 17:09:27 WST 2006


skip at pobox.com wrote:
> I have a GtkWindow and children defined in glade that I instantiate multiple
> times and place into a notebook.  One of the window's descendants is a radio
> button.  I want all instances of that radio button across the different
> windows to belong to the same group.  Unfortunately, glade insists that each
> radio button be placed in a group, and rb.set_group() won't let me change
> the group on-the-fly (after instantiating the window and its kids).  Is
>   
use a radiobutton in a different group as the group arg to set_group():

rb0.set_group(rb2)

or:

rb0.props.group = rb2

This will put rb0 in the same group as rb2

John


More information about the pygtk mailing list