Make Home and End keys work as expected in wxGrid.

Go to the first/last cell of the current row when they're pressed instead of
starting the editor.

Closes #12222.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2010-07-12 22:50:18 +00:00
parent b526f9d64d
commit ad178a657e

View File

@ -4669,25 +4669,15 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
break;
case WXK_HOME:
if ( event.ControlDown() )
{
GoToCell(0, 0);
}
else
{
event.Skip();
}
GoToCell(event.ControlDown() ? 0
: m_currentCellCoords.GetRow(),
0);
break;
case WXK_END:
if ( event.ControlDown() )
{
GoToCell(m_numRows - 1, m_numCols - 1);
}
else
{
event.Skip();
}
GoToCell(event.ControlDown() ? m_numRows - 1
: m_currentCellCoords.GetRow(),
m_numCols - 1);
break;
case WXK_PAGEUP: