Hi Guys
Just a newbie using Python & Glade and have the code below:
.... some code ...
class BowlsApp:
def __init__(self):
# set the glade file
self.builder = gtk.Builder()
self.builder.add_from_file("Bowls.glade")
self.window = self.builder.get_object("tournament")
self.builder.connect_signals(handles.__dict__)
def __getitem__(self,key):
# provide link to widgets
return self.builder.get_object(key)
####################################
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> run application
####################################
if __name__ == '__main__':
cbc = BowlsApp()
cbc.window.show()
gtk.main()
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?
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/