When checking whether the parent control has wxTAB_TRAVERSAL, take into account that the wxComboCtrl can be part of a composite control, such as generic wxDatePickerCtrl (fixes #11630).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@63158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1621,13 +1621,13 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event)
|
||||
{
|
||||
int keycode = event.GetKeyCode();
|
||||
|
||||
if ( GetParent()->HasFlag(wxTAB_TRAVERSAL) &&
|
||||
wxWindow* mainCtrl = GetMainWindowOfCompositeControl();
|
||||
|
||||
if ( mainCtrl->GetParent()->HasFlag(wxTAB_TRAVERSAL) &&
|
||||
keycode == WXK_TAB )
|
||||
{
|
||||
wxNavigationKeyEvent evt;
|
||||
|
||||
wxWindow* mainCtrl = GetMainWindowOfCompositeControl();
|
||||
|
||||
evt.SetFlags(wxNavigationKeyEvent::FromTab|
|
||||
(!event.ShiftDown() ? wxNavigationKeyEvent::IsForward
|
||||
: wxNavigationKeyEvent::IsBackward));
|
||||
|
Reference in New Issue
Block a user