From: Robin Dunn Date: Mon, 25 Sep 2006 20:26:00 +0000 (+0000) Subject: add tests for EVT_TEXT_ENTER X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/627e49c80cbc3d47c41bed93fdc9d158c888de3a add tests for EVT_TEXT_ENTER git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41449 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/demo/TextCtrl.py b/wxPython/demo/TextCtrl.py index 1717e52a02..003c100da7 100644 --- a/wxPython/demo/TextCtrl.py +++ b/wxPython/demo/TextCtrl.py @@ -39,10 +39,12 @@ class TestPanel(wx.Panel): t3 = wx.TextCtrl(self, -1, "Here is a looooooooooooooong line of text set in the control.\n\n" "The quick brown fox jumped over the lazy dog...", - size=(200, 100), style=wx.TE_MULTILINE) + size=(200, 100), style=wx.TE_MULTILINE|wx.TE_PROCESS_ENTER) t3.SetInsertionPoint(0) self.Bind(wx.EVT_TEXT, self.EvtText, t3) + self.Bind(wx.EVT_TEXT_ENTER, self.EvtTextEnter, t3) + b = wx.Button(self, -1, "Test Replace") self.Bind(wx.EVT_BUTTON, self.OnTestReplace, b) b2 = wx.Button(self, -1, "Test GetSelection") @@ -92,6 +94,9 @@ class TestPanel(wx.Panel): def EvtText(self, event): self.log.WriteText('EvtText: %s\n' % event.GetString()) + def EvtTextEnter(self, event): + self.log.WriteText('EvtTextEnter\n') + event.Skip() def EvtChar(self, event): self.log.WriteText('EvtChar: %d\n' % event.GetKeyCode())