{ }
void OnKeyDown(wxKeyEvent& event);
+ void OnChar(wxKeyEvent& event);
private:
wxGrid* m_grid;
IMPLEMENT_DYNAMIC_CLASS( wxGridCellEditorEvtHandler, wxEvtHandler )
BEGIN_EVENT_TABLE( wxGridCellEditorEvtHandler, wxEvtHandler )
EVT_KEY_DOWN( wxGridCellEditorEvtHandler::OnKeyDown )
+ EVT_CHAR( wxGridCellEditorEvtHandler::OnChar )
END_EVENT_TABLE()
}
}
+void wxGridCellEditorEvtHandler::OnChar(wxKeyEvent& event)
+{
+ switch ( event.KeyCode() )
+ {
+ case WXK_ESCAPE:
+ case WXK_TAB:
+ case WXK_RETURN:
+ break;
+
+ default:
+ event.Skip();
+ }
+}
+
// ----------------------------------------------------------------------------
// wxGridCellRenderer
// ----------------------------------------------------------------------------