code: def OnButtonCell(self, event):
          
  
          if self.button_cell_button_id == event.GetId():
              if event.IsChecked():
                  label = self._get_button_label()
                  post_command_event(self, self.ButtonCellMsg, text=label)
              else:
                  post_command_event(self, self.ButtonCellMsg, text=False)
  
          event.Skip()
docs: Event handler for cell button toggle button