don't treat Enter always as Tab, just for the text controls

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15518 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-05-11 23:34:36 +00:00
parent ff8ebd73d7
commit a6e67b552c

View File

@ -1995,9 +1995,23 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg)
return TRUE; return TRUE;
} }
//else: no default button else // no default button
{
#endif // wxUSE_BUTTON #endif // wxUSE_BUTTON
// treat Enter as TAB: pass to the next control // this is a quick and dirty test for a text
// control
if ( !(lDlgCode & DLGC_HASSETSEL) )
{
// don't process Enter, the control might
// need it for itself and don't let
// ::IsDialogMessage() have it as it can
// eat the Enter events sometimes
return FALSE;
}
//else: treat Enter as TAB: pass to the next
// control as this is the best thing to do
// if the text doesn't handle Enter itself
}
} }
} }
break; break;