I am trying to intercept the text being typed into the Cell Editor of a wx.grid object by creating a custom cell editor and setting it as the default cell editor of my grid.
As a test I did the following:
class CellEditor(wx.grid.GridCellTextEditor):
def __init__(self):
wx.MessageBox("Init")
super(CellEditor, self).__init__()
def BeginEdit(self, *args, **kwargs):
wx.MessageBox("Begin Edit")
super(CellEditor, self).BeginEdit(*args, **kwargs)
While the "Init" message box shows up, the "begin edit" message box never appears. Even if I explicitly call the BeginEdit()
method from the debugger, the message box is not displayed. This makes me think somehow the BeginEdit method is being re-written over by the original method during initialization. Come someone help me understand what's happening?