]> git.saurik.com Git - wxWidgets.git/commitdiff
wxOwnerDrawnComboBox: handle Home and End keys as native control does.
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 5 Apr 2010 17:18:58 +0000 (17:18 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 5 Apr 2010 17:18:58 +0000 (17:18 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63863 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/odcombo.cpp

index 711f1abcf136ff5bf2e449b2ac48a49daf79d904..9dec19bc50bfdf6a880a6f38ff7c32823b1795fd 100644 (file)
@@ -291,6 +291,16 @@ bool wxVListBoxComboPopup::HandleKey( int keycode, bool saturate, wxChar unicode
         value-=10;
         StopPartialCompletion();
     }
         value-=10;
         StopPartialCompletion();
     }
+    else if ( keycode == WXK_HOME || keycode == WXK_NUMPAD_HOME )
+    {
+        value=0;
+        StopPartialCompletion();
+    }
+    else if ( keycode == WXK_END || keycode == WXK_NUMPAD_END )
+    {
+        value=itemCount-1;
+        StopPartialCompletion();
+    }
     else if ( keychar && (comboStyle & wxCB_READONLY) )
     {
         // Try partial completion
     else if ( keychar && (comboStyle & wxCB_READONLY) )
     {
         // Try partial completion