TAB key press at left or right of grid now saves editor value and

hides editor


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7623 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Bedward
2000-06-21 09:06:27 +00:00
parent 271c9d0c5b
commit 8034c36f53

View File

@@ -5287,9 +5287,31 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
case WXK_TAB:
if (event.ShiftDown())
{
if ( GetGridCursorCol() > 0 )
{
MoveCursorLeft( FALSE );
}
else
{
// at left of grid
HideCellEditControl();
SaveEditControlValue();
}
}
else
{
if ( GetGridCursorCol() > 0 )
{
MoveCursorRight( FALSE );
}
else
{
// at right of grid
HideCellEditControl();
SaveEditControlValue();
}
}
break;
case WXK_HOME: