// Created: 06.08.01
// RCS-ID: $Id$
// Copyright: (c) 2001 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// License: wxWindows license
+// License: wxWindows licence
///////////////////////////////////////////////////////////////////////////////
// ============================================================================
m_winDefault = NULL;
}
+bool wxControlContainer::AcceptsFocus() const
+{
+ // We can accept focus only when at last one child will accept focus
+ if ( m_winParent->IsShown() && m_winParent->IsEnabled() )
+ {
+ wxWindowList::Node *node = m_winParent->GetChildren().GetFirst();
+ while ( node )
+ {
+ wxWindow *child = node->GetData();
+
+ if ( child->AcceptsFocus() )
+ {
+ return TRUE;
+ }
+
+ node = node->GetNext();
+ }
+ }
+
+ return FALSE;
+}
+
void wxControlContainer::SetLastFocus(wxWindow *win)
{
// the panel itself should never get the focus at all but if it does happen
return FALSE;
}
+