[ 1585858 ] Fix wxDatePickerCtrlGeneric and wxComboCtrl kb navigation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42539 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2006-10-27 18:02:21 +00:00
parent 34e2d9439b
commit 4427c0a3ff
4 changed files with 27 additions and 2 deletions

View File

@@ -732,6 +732,8 @@ void wxComboCtrlBase::Init()
m_toplevEvtHandler = (wxEvtHandler*) NULL;
#endif
m_mainCtrlWnd = this;
m_heightPopup = -1;
m_widthMinPopup = -1;
m_anchorSide = 0;
@@ -1537,11 +1539,15 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event)
if ( keycode == WXK_TAB )
{
wxNavigationKeyEvent evt;
wxWindow* mainCtrl = GetMainWindowOfCompositeControl();
evt.SetFlags(wxNavigationKeyEvent::FromTab|
(!event.ShiftDown() ? wxNavigationKeyEvent::IsForward
: wxNavigationKeyEvent::IsBackward));
evt.SetEventObject(this);
GetParent()->GetEventHandler()->AddPendingEvent(evt);
evt.SetEventObject(mainCtrl);
evt.SetCurrentFocus(mainCtrl);
mainCtrl->GetParent()->GetEventHandler()->AddPendingEvent(evt);
return;
}