code: def OnCut(self, event):
          
  
          entry_line = \
              self.main_window.entry_line_panel.entry_line_panel.entry_line
  
          if wx.Window.FindFocus() != entry_line:
              selection = self.main_window.grid.selection
  
              with undo.group(_("Cut")):
                  data = self.main_window.actions.cut(selection)
  
              self.main_window.clipboard.set_clipboard(data)
  
              self.main_window.grid.ForceRefresh()
  
          else:
              entry_line.Cut()
  
          event.Skip()
docs: Clipboard cut event handler