title: How to get the button object created by CreateButtonSizer (or CreateSeparatedButtonSizer) in wxPython
body: <p>I feel like this should be simple, but I can't find anything out there.  I have a pretty simple dialog, with two text controls.  I then create a OK/CANCEL buttons sizer using the CreateSeparatedButtonSizer method.</p>
  
  <p>The issue is, I would like to try to enable/disable the "OK" button based off of some criteria on the entries in the text controls.  In other words, until valid entries are entered into the text controls, I want the OK button to be disabled.   I can't seem to find anything on how to reference the button, and I'd rather not manually create the buttons so that the dialog remains platform 'agnostic.'</p>
  
  <p>Small sample code:</p>
  
  <pre><code>class MyDialog(wx.Dialog):
      def __init__(self, parent, title):
          wx.Dialog.__init__(self, parent=parent, title=title)
  
          # Grid sizer for text controls and labels:
          grid = wx.GridBagSizer(2,2)
  
          # Add the input fields:
          grid.Add(wx.StaticText(self, label="Field 1: "),pos=(0,0))
          self.fld1 = wx.TextCtrl(self, value="", size=(70,-1))
          grid.Add(self.fld1, pos=(0,1))
          grid.Add(wx.StaticText(self, label="Field 2: "),pos=(1,0))
          self.fld2 = wx.TextCtrl(self, value="", size=(70,-1))
          grid.Add(self.fld2, pos=(1,1))
  
          # Buttonsizer:
          btns = self.CreateSeparatedButtonSizer(wx.OK|wx.CANCEL)
  
          # Lay it all out:
          mainSizer = wx.BoxSizer(wx.VERTICAL)
          mainSizer.Add(grid, 1, wx.ALL|wx.EXPAND)
          mainSizer.Add(btns, 0, wx.ALL|wx.EXPAND)
          self.SetSizer(mainSizer)
          self.Fit()
  </code></pre>
  
  <p>So, I'd like to bind a method to the text controls, which checks whether or not the inputs are valid.  If they are, then the OK button will be enabled, and if not, then it should be disabled.  Is there any way to do this?</p>
  
  <p>Thanks!</p>