Eats EVT_CHAR events for WXK_ESCAPE, WXK_TAB, and WXK_RETURN since

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
This commit is contained in:
Robin Dunn 2000-02-16 20:54:27 +00:00
parent e4c4c1c697
commit fb0de762f3

View File

@ -182,6 +182,7 @@ public:
{ }
void OnKeyDown(wxKeyEvent& event);
void OnChar(wxKeyEvent& event);
private:
wxGrid* m_grid;
@ -194,6 +195,7 @@ private:
IMPLEMENT_DYNAMIC_CLASS( wxGridCellEditorEvtHandler, wxEvtHandler )
BEGIN_EVENT_TABLE( wxGridCellEditorEvtHandler, wxEvtHandler )
EVT_KEY_DOWN( wxGridCellEditorEvtHandler::OnKeyDown )
EVT_CHAR( wxGridCellEditorEvtHandler::OnChar )
END_EVENT_TABLE()
@ -492,6 +494,20 @@ void wxGridCellEditorEvtHandler::OnKeyDown(wxKeyEvent& event)
}
}
void wxGridCellEditorEvtHandler::OnChar(wxKeyEvent& event)
{
switch ( event.KeyCode() )
{
case WXK_ESCAPE:
case WXK_TAB:
case WXK_RETURN:
break;
default:
event.Skip();
}
}
// ----------------------------------------------------------------------------
// wxGridCellRenderer
// ----------------------------------------------------------------------------