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:
parent
95e9b72bf4
commit
e0c83227fd
@ -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)
|
||||
};
|
||||
|
||||
|
@ -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__)
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user