code: def OnLinkVLCVideo(self, event):
          
  
          key = self.grid.actions.cursor
  
          if event.videofile:
              try:
                  video_volume = \
                      self.grid.code_array.cell_attributes[key]["video_volume"]
              except KeyError:
                  video_volume = None
  
              self.grid.actions.set_attr("panel_cell", True)
  
              if video_volume is not None:
                  code = 'vlcpanel_factory("{}", {})'.format(
                      event.videofile, video_volume)
              else:
                  code = 'vlcpanel_factory("{}")'.format(event.videofile)
  
              self.grid.actions.set_code(key, code)
  
          else:
              try:
                  video_panel = self.grid.grid_renderer.video_cells.pop(key)
                  video_panel.player.stop()
                  video_panel.player.release()
                  video_panel.Destroy()
              except KeyError:
                  pass
  
              self.grid.actions.set_code(key, u"")
docs: VLC video code event handler