F2 enables edit in place

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6274 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-02-25 02:29:38 +00:00
parent abceee76ea
commit c239a4bb76

View File

@@ -4748,11 +4748,12 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
// Otherwise fall through to default // Otherwise fall through to default
default: default:
// alphanumeric keys enable the cell edit control // alphanumeric keys or F2 (special key just for this) enable
// the cell edit control
if ( !(event.AltDown() || if ( !(event.AltDown() ||
event.MetaDown() || event.MetaDown() ||
event.ControlDown()) && event.ControlDown()) &&
isalnum(event.KeyCode()) && (isalnum(event.KeyCode()) || event.KeyCode() == WXK_F2) &&
!IsCellEditControlEnabled() && !IsCellEditControlEnabled() &&
CanEnableCellControl() ) CanEnableCellControl() )
{ {