they are handled in EVT_KEY_DOWN. It also gets rid of the annoying
bell on MSW for the return key.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6093
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{ }
void OnKeyDown(wxKeyEvent& event);
{ }
void OnKeyDown(wxKeyEvent& event);
+ void OnChar(wxKeyEvent& event);
IMPLEMENT_DYNAMIC_CLASS( wxGridCellEditorEvtHandler, wxEvtHandler )
BEGIN_EVENT_TABLE( wxGridCellEditorEvtHandler, wxEvtHandler )
EVT_KEY_DOWN( wxGridCellEditorEvtHandler::OnKeyDown )
IMPLEMENT_DYNAMIC_CLASS( wxGridCellEditorEvtHandler, wxEvtHandler )
BEGIN_EVENT_TABLE( wxGridCellEditorEvtHandler, wxEvtHandler )
EVT_KEY_DOWN( wxGridCellEditorEvtHandler::OnKeyDown )
+ EVT_CHAR( wxGridCellEditorEvtHandler::OnChar )
+void wxGridCellEditorEvtHandler::OnChar(wxKeyEvent& event)
+{
+ switch ( event.KeyCode() )
+ {
+ case WXK_ESCAPE:
+ case WXK_TAB:
+ case WXK_RETURN:
+ break;
+
+ default:
+ event.Skip();
+ }
+}
+
// ----------------------------------------------------------------------------
// wxGridCellRenderer
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
// wxGridCellRenderer
// ----------------------------------------------------------------------------