#include "wx/checkbox.h"
#include "wx/combobox.h"
#include "wx/valtext.h"
+ #include "wx/intl.h"
#endif
#include "wx/textfile.h"
void wxGridCellFloatEditor::StartingKey(wxKeyEvent& event)
{
int keycode = event.GetKeyCode();
- if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-' || keycode == '.'
+ if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
+ || keycode == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER)[0u]
|| keycode == WXK_NUMPAD0
|| keycode == WXK_NUMPAD1
|| keycode == WXK_NUMPAD2
return TRUE;
default:
- // additionally accept 'e' as in '1e+6'
+ // additionally accept 'e' as in '1e+6', also '-', '+', and '.'
if ( (keycode < 128) &&
- (wxIsdigit(keycode) || tolower(keycode) == 'e') )
+ (wxIsdigit(keycode) || tolower(keycode) == 'e' ||
+ keycode == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER)[0u] ||
+ keycode == '+' || keycode == '-') )
return TRUE;
}
}
unsigned int i, n;
for ( n = 1; ; n++ )
{
- s += (_T('A') + (wxChar)( col%26 ));
+ s += (wxChar) (_T('A') + (wxChar)( col%26 ));
col = col/26 - 1;
if ( col < 0 ) break;
}