git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11296
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
void HandleOnFocus(wxFocusEvent& event);
void HandleOnWindowDestroy(wxWindowBase *child);
void HandleOnFocus(wxFocusEvent& event);
void HandleOnWindowDestroy(wxWindowBase *child);
- // should be called from SetFocus()
- void DoSetFocus();
+ // should be called from SetFocus(), returns FALSE if we did nothing with
+ // the focus and the default processing should take place
+ bool DoSetFocus();
protected:
// set the focus to the child which had it the last time
protected:
// set the focus to the child which had it the last time
\
void classname::SetFocus() \
{ \
\
void classname::SetFocus() \
{ \
- container->DoSetFocus(); \
+ if ( !container->DoSetFocus() ) \
+ wxWindow::SetFocus(); \
} \
\
void classname::OnChildFocus(wxChildFocusEvent& event) \
} \
\
void classname::OnChildFocus(wxChildFocusEvent& event) \
// focus handling
// ----------------------------------------------------------------------------
// focus handling
// ----------------------------------------------------------------------------
-void wxControlContainer::DoSetFocus()
+bool wxControlContainer::DoSetFocus()
{
wxLogTrace(_T("focus"), _T("SetFocus on wxPanel 0x%08x."),
m_winParent->GetHandle());
{
wxLogTrace(_T("focus"), _T("SetFocus on wxPanel 0x%08x."),
m_winParent->GetHandle());
//
// RR: Removed for now. Let's see what happens..
//
// RR: Removed for now. Let's see what happens..
- if ( !SetFocusToChild() )
- {
- m_winParent->SetFocus();
- }
+ return SetFocusToChild();
}
void wxControlContainer::HandleOnFocus(wxFocusEvent& event)
}
void wxControlContainer::HandleOnFocus(wxFocusEvent& event)