code: def OnButtonApply(self, event):
          
  
          try:
              dialect, self.has_header = self.csvwidgets.get_dialect()
          except TypeError:
              event.Skip()
              return 0
  
          self.preview_textctrl.fill(data=self.data, dialect=dialect)
  
          event.Skip()
docs: Updates the preview_textctrl