On 03-06-10 03:38, Brian Rowlands (Greymouth High School) wrote:
>
> Hi Guys
>
> Just a newbie using Python & Glade and have the code below:
>
> The GUI contains 4 radio buttons [ I'll call them four, three, two, 
> one  ] in a group called four. My research came across:
>
> radio = [r for r in cbc['four'].get_group() if r.get_active()]
>
> which gets me the active button with print radio giving me:
>
> [<gtk.RadioButton object at 0xe903c8 (GtkRadioButton at 0x13ab548)>]
>
> My question: how do i get the 'name' of the button which is active?
>
Every widget has the get_name() method. You could try that.

Cheers,
Timo


> Tried print radio.get_label() and that failed as there is no attribute 
> called label.
>
> Any help appreciated. Even a reference.
>
> Thanks
>
>
> _______________________________________________
> pygtk mailing list   [email protected]
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://faq.pygtk.org/

_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://faq.pygtk.org/

Reply via email to