fixed initial focus handling in the dialog and made SetFocus() send the focus

events as under wxMSW


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15218 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-04-20 13:53:11 +00:00
parent 33b494d643
commit 6aeb6f2a58
9 changed files with 159 additions and 318 deletions

View File

@@ -50,6 +50,12 @@ wxControlContainer::wxControlContainer(wxWindow *winParent)
void wxControlContainer::SetLastFocus(wxWindow *win)
{
// the panel itself should never get the focus at all but if it does happen
// temporarily (as it seems to do under wxGTK), at the very least don't
// forget our previous m_winLastFocused
if ( win == m_winParent )
return;
// if we're setting the focus
if ( win )
{
@@ -70,6 +76,17 @@ void wxControlContainer::SetLastFocus(wxWindow *win)
}
m_winLastFocused = win;
if ( win )
{
wxLogTrace(_T("focus"), _T("Set last focus to %s(%s)"),
win->GetClassInfo()->GetClassName(),
win->GetLabel().c_str());
}
else
{
wxLogTrace(_T("focus"), _T("No more last focus"));
}
}
// ----------------------------------------------------------------------------