+ 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
+
+ // find the new partial completion string
+#if wxUSE_TIMER
+ if (m_partialCompletionTimer.IsRunning())
+ m_partialCompletionString+=wxString(keychar);
+ else
+#endif // wxUSE_TIMER
+ m_partialCompletionString=wxString(keychar);
+
+ // now search through the values to see if this is found
+ int found = -1;
+ unsigned int length=m_partialCompletionString.length();
+ int i;
+ for (i=0; i<itemCount; i++)
+ {
+ wxString item=GetString(i);
+ if (( item.length() >= length) && (! m_partialCompletionString.CmpNoCase(item.Left(length))))
+ {
+ found=i;
+ break;
+ }
+ }
+
+ if (found<0)
+ {
+ StopPartialCompletion();
+ ::wxBell();
+ return true; // to stop the first value being set
+ }
+ else
+ {
+ value=i;
+#if wxUSE_TIMER
+ m_partialCompletionTimer.Start(wxODCB_PARTIAL_COMPLETION_TIME, true);
+#endif // wxUSE_TIMER
+ }