let the popup listbox process the kbd messages in wxComboBox

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@14698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-03-21 02:36:25 +00:00
parent 95e9b72bf4
commit e0c83227fd
2 changed files with 13 additions and 0 deletions

View File

@ -151,9 +151,13 @@ protected:
// notify the combo here
virtual void OnDismiss();
// forward the key presses to the combobox
void OnKeyDown(wxKeyEvent& event);
// the parent combobox
wxComboControl *m_combo;
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxPopupComboWindow)
};

View File

@ -304,6 +304,10 @@ bool wxPopupTransientWindow::ProcessLeftDown(wxMouseEvent& WXUNUSED(event))
// wxPopupComboWindow
// ----------------------------------------------------------------------------
BEGIN_EVENT_TABLE(wxPopupComboWindow, wxPopupTransientWindow)
EVT_KEY_DOWN(wxPopupComboWindow::OnKeyDown)
END_EVENT_TABLE()
wxPopupComboWindow::wxPopupComboWindow(wxComboControl *parent)
: wxPopupTransientWindow(parent)
{
@ -341,6 +345,11 @@ void wxPopupComboWindow::OnDismiss()
m_combo->OnDismiss();
}
void wxPopupComboWindow::OnKeyDown(wxKeyEvent& event)
{
m_combo->ProcessEvent(event);
}
#endif // wxUSE_COMBOBOX && defined(__WXUNIVERSAL__)
// ----------------------------------------------------------------------------