Trying to make a wxPython TextCtrl
to react on ENTER, I get an assertion error:
self.fileNameInput = wx.TextCtrl (self, style=wx.TE_PROCESS_ENTER)
self.fileNameInput.Bind (wx.wxEVT_COMMAND_TEXT_ENTER, self.onRename)
terminates with an assertion error in Bind
:
assert isinstance(event, wx.PyEventBinder)
AssertionError
No wonder that wx.wxEVT_COMMAND_TEXT_ENTER
is not an instance, it's number.
I read a remark about changes to the events between Python 2 and 3 - did I mix versions of libraries?
Do you mean
wx.EVT_TEXT_ENTER
?Example: