code: def OnRowSize(self, event):
          
  
          row = event.GetRowOrCol()
          tab = self.grid.current_table
          rowsize = self.grid.GetRowSize(row) / self.grid.grid_renderer.zoom
  
          # Detect for resizing group of rows
          rows = self.grid.GetSelectedRows()
          if len(rows) == 0:
              rows = [row, ]
  
          # Detect for selection of rows spanning all columns
          selection = self.grid.selection
          num_cols = self.grid.code_array.shape[1]-1
          for box in zip(selection.block_tl, selection.block_br):
              leftmost_col = box[0][1]
              rightmost_col = box[1][1]
              if leftmost_col == 0 and rightmost_col == num_cols:
                  rows += range(box[0][0], box[1][0]+1)
  
          # All row resizing is undone in one click
          with undo.group(_("Resize Rows")):
              for row in rows:
                  self.grid.code_array.set_row_height(row, tab, rowsize)
                  zoomed_rowsize = rowsize * self.grid.grid_renderer.zoom
                  self.grid.SetRowSize(row, zoomed_rowsize)
  
          # Mark content as changed
          post_command_event(self.grid.main_window, self.grid.ContentChangedMsg)
  
          event.Skip()
          self.grid.ForceRefresh()
docs: Row size event handler