Problem with event handler radiobutton

Hi, I have a problem with the event handler of
radiobutton.

I have two buttons, the first one is automaticly
select on start.
When I click it, it does not generate any event, when
I click on the second one, is select it and the event
is throw and the method is called.
But if I reclick it, no method is called. I still can
select one or the other, but the methond is called no
more.

Here is the part of the code related:

   def __init__(self, *args, **kwds):
     self.server_name_rb =
wx.RadioButton(self.main_panel, 100, " Nom du Serveur
", style = wx.RB_GROUP)
     self.list_rb = wx.RadioButton(self.main_panel,
101, " Liste ")

      # events
      wx.EVT_RADIOBUTTON(self, 100,
self.server_media_select)
      wx.EVT_RADIOBUTTON(self, 101,
self.server_media_select)

    def server_media_select(self, event):
        radio_selected = event.GetEventObject()
        print str(radio_selected.GetLabel())
        configdict['type'] = 'file'
        configdict['host_filename'] = ''
        
any hint will be appreciated

Thank you

···

__________________________________________________________
Lèche-vitrine ou lèche-écran ?
magasinage.yahoo.ca

Francis Lavoie wrote:

Hi, I have a problem with the event handler of
radiobutton.

I have two buttons, the first one is automaticly
select on start.
When I click it, it does not generate any event, when
I click on the second one, is select it and the event
is throw and the method is called.
But if I reclick it, no method is called. I still can
select one or the other, but the methond is called no
more.

Here is the part of the code related:

Please specify the version and platform you are using. Also a small but complete sample that shows the problem would be most helpful.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!