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:
@@ -5287,9 +5287,31 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
||||
|
||||
case WXK_TAB:
|
||||
if (event.ShiftDown())
|
||||
MoveCursorLeft( FALSE );
|
||||
{
|
||||
if ( GetGridCursorCol() > 0 )
|
||||
{
|
||||
MoveCursorLeft( FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
// at left of grid
|
||||
HideCellEditControl();
|
||||
SaveEditControlValue();
|
||||
}
|
||||
}
|
||||
else
|
||||
MoveCursorRight( FALSE );
|
||||
{
|
||||
if ( GetGridCursorCol() > 0 )
|
||||
{
|
||||
MoveCursorRight( FALSE );
|
||||
}
|
||||
else
|
||||
{
|
||||
// at right of grid
|
||||
HideCellEditControl();
|
||||
SaveEditControlValue();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WXK_HOME:
|
||||
|
Reference in New Issue
Block a user