wxPython - ENTER/RETURN key binding for a wx.Dialog
To set ENTER / RETURN key binding for a wx.Dialog, add the following to a button of that dialog: self.mybutton.SetDefault() For example: class LoginDialog (wx.Dialog): def __init__ (self, parent, id=-1, title='Login', text='Please type your username and password:', username=''): size = (400, 200) wx.Dialog.__init__(self, parent, id, title, size=size) self.panel = LoginPanel(self) sizer = wx.GridSizer(1, 1) sizer.Add(self.panel, flag=wx.ALIGN_CENTER | wx.ALIGN_CENTER_VERTICAL) self.SetSizer(sizer) self.Bind(wx.EVT_CLOSE, self.OnClose, self)...