Process a textCtrl key event as if the textCtrl was a grid cell.
This catches ESC and ENTER events in textCtrls and processes them as if the
textCtrl were a grid cell. This method can be bound to the wx.EVT_KEY_DOWN
event of any textCtrl. See phaseconfigurepanel.py in diffpy.pdfgui.gui for
an example.
ESC -- Cancel the edit and highlight the text. This requires that
panel has a _focusedText attribute that stores the previous value.
ENTER -- Confirm the edit and move to the next cell (the default TAB
behavior).
|