When checking whether the parent has wxTAB_TRAVERSAL style, take into account that the wxComboCtrl can be part of a composite control

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Jaakko Salli
2010-01-15 17:19:54 +00:00
parent 68893d5803
commit bbb8690483

View File

@@ -1775,9 +1775,13 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event)
}
else // no popup
{
if ( GetParent()->HasFlag(wxTAB_TRAVERSAL) &&
HandleAsNavigationKey(event) )
wxWindow* mainCtrl = GetMainWindowOfCompositeControl();
if ( mainCtrl->GetParent()->HasFlag(wxTAB_TRAVERSAL) )
{
if ( mainCtrl->HandleAsNavigationKey(event) )
return;
}
if ( IsKeyPopupToggle(event) )
{
@@ -2022,7 +2026,8 @@ void wxComboCtrlBase::ShowPopup()
// that if transient popup is open, then tab traversal is to be ignored.
// However, I think this code would still be needed for cases where
// transient popup doesn't work yet (wxWinCE?).
wxWindow* parent = GetParent();
wxWindow* mainCtrl = GetMainWindowOfCompositeControl();
wxWindow* parent = mainCtrl->GetParent();
int parentFlags = parent->GetWindowStyle();
if ( parentFlags & wxTAB_TRAVERSAL )
{