- EVT_TEXT(self, t1.GetId(), self.EvtText)
- EVT_CHAR(t1, self.EvtChar)
- EVT_SET_FOCUS(t1, self.OnSetFocus)
- EVT_KILL_FOCUS(t1, self.OnKillFocus)
- EVT_WINDOW_DESTROY(t1, self.OnWindowDestroy)
-
- l2 = wxStaticText(self, -1, "Passsword")
- t2 = wxTextCtrl(self, -1, "", size=(125, -1), style=wxTE_PASSWORD)
- EVT_TEXT(self, t2.GetId(), self.EvtText)
-
- l3 = wxStaticText(self, -1, "Multi-line")
- t3 = wxTextCtrl(self, -1,
+
+ self.Bind(wx.EVT_TEXT, self.EvtText, t1)
+ t1.Bind(wx.EVT_CHAR, self.EvtChar)
+ t1.Bind(wx.EVT_SET_FOCUS, self.OnSetFocus)
+ t1.Bind(wx.EVT_KILL_FOCUS, self.OnKillFocus)
+ t1.Bind(wx.EVT_WINDOW_DESTROY, self.OnWindowDestroy)
+
+ l2 = wx.StaticText(self, -1, "Password")
+ t2 = wx.TextCtrl(self, -1, "", size=(125, -1), style=wx.TE_PASSWORD)
+ self.Bind(wx.EVT_TEXT, self.EvtText, t2)
+
+ l3 = wx.StaticText(self, -1, "Multi-line")
+ t3 = wx.TextCtrl(self, -1,