title: How to return selected check boxes using wxPython?
body: <p>I want to perform following tasks but not getting there:</p>
  
  <p>1] Get checked options under 'OnApply'</p>
  
  <p>2] Once I checked few options then 'Select' or 'UnSelectAll' will only not select/unselect those options which were not selected/selected manually?</p>
  
  <p>Do I need to index all check box options to do above tasks?</p>
  
  <p>Any help to accomplish this would be very appreciative. Please let me know if its not clear.</p>
  
  <pre><code>import wx
  
  class MyCheckBox(wx.Frame):
      def __init__(self, parent, id, title):
          wx.Frame.__init__(self, parent, id, 'Checking Options', size=(470, 400))
          panel = wx.Panel(self, -1)
  
          self.cb = wx.CheckBox(panel, -1, '', (120, 75))
          self.cb.SetValue(False)
          self.cb = wx.CheckBox(panel, -1, '', (200, 75))
          self.cb.SetValue(False)
          self.cb = wx.CheckBox(panel, -1, '', (278, 75))
          self.cb.SetValue(False)
          self.cb = wx.CheckBox(panel, -1, '', (356, 75))
          self.cb.SetValue(False)
  
          self.cb = wx.CheckBox(panel, -1, '', (120, 105))
          self.cb.SetValue(False)
          self.cb = wx.CheckBox(panel, -1, '', (200, 105))
          self.cb.SetValue(False)
          self.cb = wx.CheckBox(panel, -1, '', (278, 105))
          self.cb.SetValue(False)
          self.cb = wx.CheckBox(panel, -1, '', (356, 105))
          self.cb.SetValue(False)
  
  
          wx.StaticText(panel, -1, "Send output to File", (70, 255))
          self.cb = wx.CheckBox(panel, -1, '', (50, 255))
          self.cb.SetValue(True)
  
          wx.EVT_CHECKBOX(self, self.cb.GetId(), self.ShowTitle)
  
          self.btnSelect = wx.Button(panel, label="Select All", pos=(45, 295))
          self.Bind(wx.EVT_BUTTON, self.OnSelectAll, id = self.btnSelect.GetId())
  
          self.btnUnSelectAll = wx.Button(panel, label="Unselect All*", pos=(173, 295))
          self.Bind(wx.EVT_BUTTON, self.OnUnSelectAll, id = self.btnUnSelectAll.GetId())
  
          self.btnApply = wx.Button(panel, label="Apply/Close", pos=(305, 295))
          self.Bind(wx.EVT_BUTTON, self.OnApply, id = self.btnApply.GetId())
  
          wx.StaticText(panel, -1, "* Note: 'Unselect All' button will not unselect storms that" '\n'
                    "   have already determined", (20, 350))
  
          self.Show()
          self.Centre()
  
      def ShowTitle(self, event):
          if self.cb.GetValue():
              self.SetTitle('checkbox.py')
          else: self.SetTitle('')
  
      def OnSelectAll(self, event):
          self.cb.SetValue(True)
  
      def OnUnSelectAll(self, event):
          pass
  
      def OnApply(self, event):
          selection = self.cb.GetValue()
  
  
  app = wx.App(0)
  MyCheckBox(None, -1, 'checkbox.py')
  app.MainLoop()
  </code></pre>