buttons now become default when they have focus

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-06-20 22:07:49 +00:00
parent 319fefa910
commit 57c0af52bf
2 changed files with 14 additions and 2 deletions

View File

@@ -1458,7 +1458,16 @@ bool wxWindow::MSWProcessMessage(WXMSG* pMsg)
event.SetEventObject(this);
if ( GetEventHandler()->ProcessEvent(event) )
{
wxButton *btn = wxDynamicCast(FindFocus(), wxButton);
if ( btn )
{
// the button which has focus should be default
btn->SetDefault();
}
return TRUE;
}
}
}