code: def OnContentChange(self, event):
          
  
          self.ignore_changes = True
          self.SetValue(u"" if event.text is None else event.text)
  
          self.ignore_changes = False
  
          event.Skip()
docs: Event handler for updating the content