code: def OnSecondaryCheckbox(self, event):
          
  
          self.attrs["top"] = event.IsChecked()
          self.attrs["right"] = event.IsChecked()
  
          post_command_event(self, self.DrawChartMsg)
docs: Top Checkbox event handler