title: wxPython : EVT_BUTTON on a portion of a panel
body: <p>Hello evryone :) I would like to capture click event in a blue box drawn inside a wx.Panel</p>
  
  <p>I already know how to reacts to button click :</p>
  
  <pre><code>myButton.Bind(wx.EVT_BUTTON, myHandler)
  </code></pre>
  
  <p>or </p>
  
  <pre><code>myFrame.Bind(wx.EVT_BUTTON, myHandler, myFrame.myConcernedButton)
  </code></pre>
  
  <p>But how must I do if I want to </p>
  
  <ol>
  <li>Draw a blue square onto a Panel, what I can already manage, luckily.</li>
  <li>Capture a EVT_BUTTON onto the blue square only, and not the whole panel ?</li>
  </ol>
  
  <p>I think I should make a new class for my SquareBox, but :</p>
  
  <ol>
  <li>What class should it be derived from ?</li>
  <li>So far then, how to add event handling to that class ?</li>
  </ol>
  
  <p>Thank you very much.</p>
  
  <p>P.S : For the little history, I used to develop in Java &amp; SWING</p>
  
  <hr>
  
  <p>Edit :</p>
  
  <p>As Mike Driscoll advised me, I tried to solve my problem with a PlateButton. But unfortunately, I did not managed to give the button the wanted dimension nor the wanted style (it changes its color when it is clicked, and I don't wan't this). Furthermore, it doesn't react at all to EVT_BUTTON event.</p>
  
  <p>This is my attempt, thanks in advance :</p>
  
  <pre><code>import wx
  from wx.lib.platebtn import PlateButton
  
  class Square(PlateButton):
  
      def __init__(self, parent, size, pos):
          PlateButton.__init__(self, parent, size = size, pos = pos)
          self.SetBackgroundColour(wx.Colour(0,0,255))
  
  class MainFrame(wx.Frame):
  
      def __init__(self):
          wx.Frame.__init__(self, None, wx.ID_ANY, "Reactive square application",
              size = (300,200))
          panel = wx.Panel(self, wx.ID_ANY)
          square1 = Square(panel, size=(60,60), pos=(80,50))
          square2 = Square(panel, size=(60,60), pos=(80,120))
          square1.Bind(wx.EVT_BUTTON, self.OnSquareClick)
  
      def OnSquareClick(self, event):
          dialog = wx.MessageDialog(self, "You clicked on square !!!",
              "Hit has been done", wx.OK)
          dialog.Show(True)
  
  
  if __name__ == "__main__":
      app = wx.PySimpleApp()
      frame = MainFrame()
      frame.Show(True)
      app.MainLoop()
  </code></pre>