code: def OnCellFontBold(self, event):
          
  
          with undo.group(_("Bold")):
              try:
                  try:
                      weight = getattr(wx, event.weight[2:])
  
                  except AttributeError:
                      msg = _("Weight {weight} unknown").format(
                              weight=event.weight)
                      raise ValueError(msg)
  
                  self.grid.actions.set_attr("fontweight", weight)
  
              except AttributeError:
                  self.grid.actions.toggle_attr("fontweight")
  
          self.grid.ForceRefresh()
  
          self.grid.update_attribute_toolbar()
  
          event.Skip()
docs: Cell font bold event handler