When running this small demo the EVT_TEXT_ENTER event never trigger but EVT_TEXT is ok.. Both worked in wxpython 2.6 and early 2.7.x
The problem was detected using wxPython 2.8.6.0 Unicode ,python 2.5.1, Xp pro sp2.
Is this a problem with 2.8, or is my code incorrect?
Thanks for any help,
Jens B. Helmers
import wx
class MyPanel(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent, -1)
t1 = wx.TextCtrl(self, -1, "")
self.Bind(wx.EVT_TEXT, self.EvtText, t1)
self.Bind(wx.EVT_TEXT_ENTER, self.EvtTextEnter, t1)
def EvtText(self, event):
print "EVT_TEXT"
def EvtTextEnter(self, event):
print "EVT_TEXT_ENTER"
class MyFrame(wx.Frame):
def __init__(self):
wx.Frame.__init__(self, None, -1, 'Bug? - evt_text_enter')
panel = MyPanel(self)
sizer = wx.BoxSizer()
sizer.Add(panel, 1, wx.EXPAND)
self.SetSizer(sizer)
self.SetAutoLayout(True)
sizer.Fit(self)
sizer.SetSizeHints(self)
self.SetSize(size=wx.Size(300,50))
class MyApp(wx.App):
def OnInit(self):
wx.InitAllImageHandlers()
frame = MyFrame()
frame.Show(True)
return True
app = MyApp(False)
app.MainLoop()