code: def OnCellTextRotation(self, event):
          
  
          with undo.group(_("Rotation")):
              self.grid.actions.toggle_attr("angle")
  
          self.grid.ForceRefresh()
  
          self.grid.update_attribute_toolbar()
  
          if is_gtk():
              try:
                  wx.Yield()
              except:
                  pass
  
          event.Skip()
docs: Cell text rotation event handler