void wxGridCellFloatEditor::StartingKey(wxKeyEvent& event)
{
int keycode = event.GetKeyCode();
+ char tmpbuf[2];
+ tmpbuf[0] = (char) keycode;
+ tmpbuf[1] = '\0';
+ bool is_decimal_point = ( wxString(tmpbuf, *wxConvCurrent) ==
+ wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) );
if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
- || keycode == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER)[0u]
+ || is_decimal_point
|| keycode == WXK_NUMPAD0
|| keycode == WXK_NUMPAD1
|| keycode == WXK_NUMPAD2
case WXK_NUMPAD_DECIMAL:
return TRUE;
- default:
- // additionally accept 'e' as in '1e+6', also '-', '+', and '.'
+ default:
+ {
+ // additionally accept 'e' as in '1e+6', also '-', '+', and '.'
+ char tmpbuf[2];
+ tmpbuf[0] = (char) keycode;
+ tmpbuf[1] = '\0';
+ bool is_decimal_point =
+ ( wxString(tmpbuf, *wxConvCurrent) ==
+ wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT,
+ wxLOCALE_CAT_NUMBER) );
if ( (keycode < 128) &&
(wxIsdigit(keycode) || tolower(keycode) == 'e' ||
- keycode == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER)[0u] ||
- keycode == '+' || keycode == '-') )
+ is_decimal_point || keycode == '+' || keycode == '-') )
return TRUE;
+ }
}
}
wxGridRowLabelWindow::wxGridRowLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE )
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE )
{
m_owner = parent;
}
wxGridColLabelWindow::wxGridColLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE )
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE )
{
m_owner = parent;
}
wxGridCornerLabelWindow::wxGridCornerLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE )
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE )
{
m_owner = parent;
}
wxWindowID id,
const wxPoint &pos,
const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS | wxBORDER_NONE | wxCLIP_CHILDREN,
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS | wxBORDER_NONE | wxCLIP_CHILDREN|wxFULL_REPAINT_ON_RESIZE,
wxT("grid window") )
{