code: def OnUpdate(self, event):
          
  
          attributes = event.attr
  
          self._update_buttoncell(attributes["button_cell"])
  
          self.Refresh()
  
          event.Skip()
docs: Updates the toolbar states