From f79086458558a4c84f2d3e90f0ac6421be2266be Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Tue, 1 Jun 2010 15:38:53 +0000 Subject: [PATCH] Interpret arrow keys correctly in wxMSW wxComboCtrl::IsKeyPopupToggle() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@64459 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 2 ++ src/msw/combo.cpp | 16 ++++------------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index fd4347b09d..91c1eedd35 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -100,6 +100,8 @@ wxMSW: - wxOwnerDrawnComboBox and wxComboCtrl with wxCB_READONLY window style now have more native-like focus indicator rendering. +- Fixed wxOwnerDrawnComboBox keyboard handling: drop-down is no longer + displayed when arrow key is pressed (without Alt). 2.8.11: ------- diff --git a/src/msw/combo.cpp b/src/msw/combo.cpp index 13f9d2998b..fa8e032d4c 100644 --- a/src/msw/combo.cpp +++ b/src/msw/combo.cpp @@ -900,19 +900,11 @@ bool wxComboCtrl::IsKeyPopupToggle(const wxKeyEvent& event) const case WXK_DOWN: case WXK_UP: - // On XP or with writable combo in Classic, arrows don't open the - // popup but Alt-arrow does - if ( event.AltDown() || - ( !isPopupShown && - HasFlag(wxCB_READONLY) -#if wxUSE_UXTHEME - && - !wxUxThemeEngine::GetIfActive() -#endif - ) ) - { + case WXK_NUMPAD_DOWN: + case WXK_NUMPAD_UP: + // Alt plus arrow key toggles the popup in the native combo box + if ( event.AltDown() ) return true; - } break; }