int comboStyle = m_combo->GetWindowStyle();
// this is the character equivalent of the code
- wxChar keychar=0;
- if ((keycode >= WXK_SPACE) && (keycode <=255) && (keycode != WXK_DELETE) && wxIsprint(keycode))
+ wxChar keychar = 0;
+ if ( keycode < WXK_START )
{
- keychar = (wxChar)keycode;
- }
- else if (unicode>0)
- {
- keychar = unicode;
+ if ( unicode > 0 )
+ {
+ if ( wxIsprint(unicode) )
+ keychar = unicode;
+ }
+ else if ( wxIsprint(keycode) )
+ {
+ keychar = (wxChar) keycode;
+ }
}
if ( keycode == WXK_DOWN || keycode == WXK_RIGHT )
value-=10;
StopPartialCompletion();
}
- else if ( comboStyle & wxCB_READONLY )
+ else if ( keychar && (comboStyle & wxCB_READONLY) )
{
// Try partial completion
}
m_strings.Insert(item,pos);
- if ( m_clientDatas.size() >= pos )
+ if ( (int)m_clientDatas.size() >= pos )
m_clientDatas.Insert(NULL, pos);
m_widths.Insert(-1,pos);