better key handling for MSW and GTK (patch 1526666)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40579 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -161,7 +161,7 @@ bool wxGenericComboControl::Create(wxWindow *parent,
|
||||
CreateTextCtrl( wxNO_BORDER, validator );
|
||||
|
||||
// Add keyboard input handlers for main control and textctrl
|
||||
InstallInputHandlers( true );
|
||||
InstallInputHandlers();
|
||||
|
||||
// Set background
|
||||
SetBackgroundStyle( wxBG_STYLE_CUSTOM ); // for double-buffering
|
||||
@@ -321,6 +321,28 @@ void wxGenericComboControl::OnMouseEvent( wxMouseEvent& event )
|
||||
|
||||
}
|
||||
|
||||
bool wxGenericComboControl::IsKeyPopupToggle(const wxKeyEvent& event) const
|
||||
{
|
||||
int keycode = event.GetKeyCode();
|
||||
bool isPopupShown = IsPopupShown();
|
||||
|
||||
// This code is AFAIK appropriate for wxGTK.
|
||||
|
||||
if ( isPopupShown )
|
||||
{
|
||||
if ( keycode == WXK_ESCAPE ||
|
||||
( keycode == WXK_UP && event.AltDown() ) )
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( keycode == WXK_DOWN && event.AltDown() )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef __WXUNIVERSAL__
|
||||
|
||||
bool wxGenericComboControl::PerformAction(const wxControlAction& action,
|
||||
|
||||
Reference in New Issue
Block a user