title: Avoid command events blocking a kill focus event in wxPython
body: <p>I'm writing a class to generate a frame on left click of a taskbar icon. The desired behaviour is for this frame to disappear on loss of focus, so I have bound a <code>wx.EVT_KILL_FOCUS</code> event to the panel in my <code>LeftClickFrame()</code> object.</p>
  
  <p>This works fine if I only have a <code>wx.StaticText</code> widget in the frame, but if I add a <code>wx.HyperlinkCtrl</code> the <code>wx.EVT_KILL_FOCUS</code> event no longer fires. I get the same blocking behaviour with <code>wx.RadioButton</code> widgets, but not with <code>wx.StaticBitmap</code>.</p>
  
  <p>I believe this is something to do with the fact that <code>wx.HyperlinkCtrl</code> and <code>wx.RadioButton</code> widgets are both controls and emit command events, but I'm not clear on what I have to do to rearrange my class so the <code>wx.EVT_KILL_FOCUS</code> event is still processed when one or both of these controls are present.</p>
  
  <p>I have the following code:</p>
  
  <pre><code>class LeftClickFrame(wx.Frame):
  
      def __init__(self, frame):
          super(LeftClickFrame, self).__init__(frame,
                                               style=wx.FRAME_NO_TASKBAR|
                                                     wx.CAPTION)
          self.tbicon = frame.taskbar_icon
          self.tbicon.options_window = self
          self.InitUI()
  
      def InitUI(self):
          self.panel = wx.Panel(self, wx.ID_ANY) 
          self.panel.Bind(wx.EVT_KILL_FOCUS, self.Close)
  
          self.main_vbox = wx.BoxSizer(wx.VERTICAL)
          statuses_hbox = self.GetStatusesVBox()
          self.main_vbox.Add(statuses_hbox)
          self.main_vbox.Add((-1, 10))        
          links_vbox = self.GetLinksVBox()
          self.main_vbox.Add(links_vbox, flag=wx.TOP|wx.CENTER, border=20)
          self.panel.SetSizer(self.main_vbox)
  
      def GetStatusesVBox(self, statuses):
          statuses_vbox = wx.BoxSizer(wx.VERTICAL)
          for status in statuses:
              battery_statuses_txt = wx.StaticText(self.panel,
                                                   wx.ID_ANY, status)
              statuses_vbox.Add(battery_statuses_txt,
                                flag=wx.TOP|wx.LEFT, border=10)
          return statuses_vbox
  
      def GetLinksVBox(self):
          links_vbox = wx.BoxSizer(wx.VERTICAL)
          link1 = wx.HyperlinkCtrl(self.panel, wx.ID_ANY, 'Adjust screen brightness')
          link1.Bind(wx.EVT_HYPERLINK, self.tbicon.LaunchPowerOptions)
          links_vbox.Add(link1, flag=wx.CENTER|wx.TOP, border=5)
          return links_vbox
  
      def Close(self):
          self.tbicon.options_window.Destroy()
          self.Destroy()
  </code></pre>