def clear_textbox(self, event): self.username_textbox.SetValue("") self.Unbind(wx.EVT_TEXT, self.username_textbox) event.Skip()