generate focus and kill focus events for wxTextCtrl at wxWindow level instead of doing it in wxTextCtrl itself and specifically disabling focus event generation for text controls in wxWindow

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-01-24 09:34:05 +00:00
parent aa709c269a
commit 4eb77d8bce
2 changed files with 3 additions and 31 deletions

View File

@@ -3978,15 +3978,6 @@ bool wxWindowMSW::HandleSetFocus(WXHWND hwnd)
}
#endif // wxUSE_CARET
#if wxUSE_TEXTCTRL
// If it's a wxTextCtrl don't send the event as it will be done
// after the control gets to process it from EN_FOCUS handler
if ( wxDynamicCastThis(wxTextCtrl) )
{
return false;
}
#endif // wxUSE_TEXTCTRL
wxFocusEvent event(wxEVT_SET_FOCUS, m_windowId);
event.SetEventObject(this);
@@ -4006,16 +3997,6 @@ bool wxWindowMSW::HandleKillFocus(WXHWND hwnd)
}
#endif // wxUSE_CARET
#if wxUSE_TEXTCTRL
// If it's a wxTextCtrl don't send the event as it will be done
// after the control gets to process it.
wxTextCtrl *ctrl = wxDynamicCastThis(wxTextCtrl);
if ( ctrl )
{
return false;
}
#endif
// Don't send the event when in the process of being deleted. This can
// only cause problems if the event handler tries to access the object.
if ( m_isBeingDeleted )