Search code examples
pythonwxpythonmessagedialog

wxPython Textentrydialog value


when I try to use the value I get it gets an empty string

    dlg = wx.TextEntryDialog(None, 'Enter User Name:', 'Log in')
    if dlg.ShowModal() == wx.OK:
       self.user=dlg.GetValue()

Solution

  • See wxPython doc. You are mixing up return IDs with wx.MessageBox.